MoEngage provides two primary options for archiving message data: exporting to an S3 bucket or an SFTP server. Each option has its own directory structure and file naming convention. Select the appropriate tab below to view the details for your configured archival method.
The following are the default file paths and file naming conventions for archived messages exported to an S3 bucket.
Channel and Platform | File Path and File Naming Convention |
---|---|
File Path:
|
|
File Name:
|
|
SMS |
File Path:
|
File Name:
|
|
Push - Android |
File Path:
|
File Name:
|
|
Push - iOS |
File Path:
|
File Name:
|
|
Push - Web |
File Path:
|
File Name:
|
Channel and Platform | File Path and File Naming Convention |
---|---|
File Path:
|
|
File Name:
|
|
SMS |
File Path:
|
File Name:
|
|
Push - Android |
File Path:
|
File Name:
|
|
Push - iOS |
File Path:
|
File Name:
|
|
Push - Web |
File Path:
|
File Name:
|
Channel and Platform | File Path and File Naming Convention |
---|---|
File Path:
|
|
File Name:
|
|
SMS |
File Path:
|
File Name:
|
|
Push - Android |
File Path:
|
File Name:
|
|
Push - iOS |
File Path:
|
File Name:
|
|
Push - Web |
File Path:
|
File Name:
|
Channel and Platform | File Path and File Naming Convention |
---|---|
File Path:
|
|
File Name:
|
|
SMS |
File Path:
|
File Name:
|
|
Push - Android |
File Path:
|
File Name:
|
|
Push - iOS |
File Path:
|
File Name:
|
|
Push - Web |
File Path:
|
File Name:
|
However, you can customize the file naming conventions based on your requirements, whether in the MoEngage S3 bucket or your S3 bucket.
- You can add any of the following attributes to the file path or file name:
Attribute Description {{cid}}
MoEngage Campaign ID {{channel}}
Channel type {{db_name}}
Workspace name {{date}}
Date of archival {{id}}
ID {{moe_transaction_id}}
MoEngage transaction ID {{time}}
Time of archival {{moe_event_id}}
MoEngage event ID {{alert_ID}}
Alert ID is for Inform. In the case of Inform, there is no campaign ID. - You can change the order of the attributes in the file name. For example, consider the file naming convention for one-time Email campaigns.
Default:
MoeCampaignID_ID_epochtime_email.eml
Customized:
ID_MoeCampaignID_epochtime_email.eml
(here, ID comes before the MoeCampaignID)
After being configured, MoEngage exports message event data to your server. The archival process groups messages from all channels (Push, Email, SMS, etc.) together into the same export files.
Server Directory Path
MoEngage uploads archive files to a specific directory path on your SFTP server. During setup, you can configure the base path for these uploads. The path you provide must end with a forward slash (/). If you do not provide a base path, MoEngage uses the default: /home/{username}/uploads/
.
MoEngage automatically appends your workspace name (db_name) and the date to create the final directory structure: your_configured_base_path/{db_name}/{YYYY-MM-DD}/
If you do not provide a custom path, MoEngage uses the following default structure:
/home/{username}/uploads/{db_name}/{YYYY-MM-DD}/
- /home/{username}/uploads/: The default base path.
- username: The username provided during the SFTP connection setup.
- db_name: The name of your MoEngage workspace.
- YYYY-MM-DD: The date of the export.
For Example, using the default path, if your username is citi-test
and your workspace (db_name) is checkfcsgain
, the files for July 15, 2025, are located in: /home/citi-test/uploads/checkfcsgain/2025-07-15/
.
Archive File Name and Structure
Files uploaded to your SFTP server are compressed into a .zip archive. These archives are named using a consistent pattern and may be split into multiple parts if the data volume is large.
ZIP File Naming Convention: [workspace_name]_[date]_[hour]_[chunk_number].zip
Component | Description |
---|---|
workspace_name |
The name of your MoEngage workspace (e.g., checkfcsgain ). |
date |
The date of the export in YYYY-MM-DD format. |
hour |
The hour of the day (00-23) during which the export was generated. |
chunk_number |
A sequential number starting from 1. If the total hourly data is under 200 MB, the chunk number will be 1. |
info |
Information Files are chunked, with a maximum size of 200 MB per chunk. If the data for a given hour exceeds this limit, it is divided into multiple ZIP files. For example, if the data for the 6 AM hour on July 14, 2025, is 350 MB, you will receive two files:
An individual message record (a complete JSON object) is never broken or split across two different files. |
Each .zip archive contains multiple JSON files. Individual JSON files adhere to the following naming and content conventions:
- Data File Name: MoEngage uses system-generated names for these files, reflecting how they were named in the internal system. For example:
sftp.bulk.upload+0+0000049701.json
. - File Content and Format: Each of these JSON files can contain one or more complete JSON objects back-to-back. There is no delimiter between the individual JSON objects within a single file. Upon opening a file, you will see the complete JSON objects one after another.
Each JSON object represents a single archived message and begins with the "message_content"
key.
A MoEngage function runs hourly to manage the export. This function gathers the latest message data, compresses it into zip archives, and uploads them to your SFTP server.