curl --request POST \
--url https://archival-{dc}.moengage.com/v1/archival/view \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'MOE-APPKEY: <moe-appkey>' \
--data '
{
"user_id": "USER_ID_123",
"delivery_type": "ONE_TIME",
"campaign_type": "General Push Campaign",
"campaign_channel": "PUSH",
"sent_epoch_time": 1716915262,
"campaign_id": "CAMPAIGN_ID_XYZ",
"event_name": "Notification Received Android",
"platform": "ANDROID"
}
'{
"status": true,
"data": {
"message_details": {
"message_type": "campaign",
"message_id": "66560c2d2880326031c474a6",
"channel": "push",
"platform": "android",
"delivery_type": "ONE_TIME",
"sent_time": "Tue, 28 May 2024 22:24:22 IST",
"message_to": "cZug38RqRd2-cF30bd2vda:APA91bGEG-OHMiWV3eHd_ohLs8V-yTgDJuQXNV32jO13or-R118OAC65MXdSx5ozYsIiL-RFan_iflQ62XVX7T2BiNqqQQfKd3FitlpbLR7nVBdkFF1yv_s8pqZux-HfThn-ojhpBIWd",
"moe_event_id": null,
"service": {
"type": "FCM"
},
"template_info": {
"type": "Native",
"version": null,
"id": "stylizedbasic"
}
},
"message_content": {
"title": "expiry in 1 hour",
"summary": "expiry in 1 hour",
"message": "expiry in 1 hour",
"related_urls": [
"https://image-staging-ap1.moengage.com/checkfcsgainmoengage/20240527083246095196HE4ELHScreenshotofUploadyourAppDiawiDevelopmentandInhouseAppsWirelessInstallationjpgcheckfcsgainmoengage.jpg"
]
},
"backup_content": {
"title": "Stylized Android Template",
"summary": null,
"message": "Sample Stylized Android Template",
"related_urls": []
},
"file_info": {
"version": "v2",
"file_name": "66560c2d2880326031c474a6_pramodseg_1716915262_push_android.json"
}
}
}{
"status": false,
"error_message": "This event is unsupported to view message copy. The supported events are ['Email Sent', 'SMS Sent', 'Notification Sent iOS', 'Notification Received Android', 'Notification Received Web']"
}{
"status": false,
"error": "Invalid data key"
}{
"title": "Server Error",
"description": "An unexpected error was encountered while processing this request. Please contact MoEngage Team",
"code": "BiaFuAzn-aefa0b0e-2c88-4106-8d07-0f0c53513e48"
}View Archived Message
Use this API to fetch (view) archived message content that was previously sent to customers.
POST
/
archival
/
view
curl --request POST \
--url https://archival-{dc}.moengage.com/v1/archival/view \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'MOE-APPKEY: <moe-appkey>' \
--data '
{
"user_id": "USER_ID_123",
"delivery_type": "ONE_TIME",
"campaign_type": "General Push Campaign",
"campaign_channel": "PUSH",
"sent_epoch_time": 1716915262,
"campaign_id": "CAMPAIGN_ID_XYZ",
"event_name": "Notification Received Android",
"platform": "ANDROID"
}
'{
"status": true,
"data": {
"message_details": {
"message_type": "campaign",
"message_id": "66560c2d2880326031c474a6",
"channel": "push",
"platform": "android",
"delivery_type": "ONE_TIME",
"sent_time": "Tue, 28 May 2024 22:24:22 IST",
"message_to": "cZug38RqRd2-cF30bd2vda:APA91bGEG-OHMiWV3eHd_ohLs8V-yTgDJuQXNV32jO13or-R118OAC65MXdSx5ozYsIiL-RFan_iflQ62XVX7T2BiNqqQQfKd3FitlpbLR7nVBdkFF1yv_s8pqZux-HfThn-ojhpBIWd",
"moe_event_id": null,
"service": {
"type": "FCM"
},
"template_info": {
"type": "Native",
"version": null,
"id": "stylizedbasic"
}
},
"message_content": {
"title": "expiry in 1 hour",
"summary": "expiry in 1 hour",
"message": "expiry in 1 hour",
"related_urls": [
"https://image-staging-ap1.moengage.com/checkfcsgainmoengage/20240527083246095196HE4ELHScreenshotofUploadyourAppDiawiDevelopmentandInhouseAppsWirelessInstallationjpgcheckfcsgainmoengage.jpg"
]
},
"backup_content": {
"title": "Stylized Android Template",
"summary": null,
"message": "Sample Stylized Android Template",
"related_urls": []
},
"file_info": {
"version": "v2",
"file_name": "66560c2d2880326031c474a6_pramodseg_1716915262_push_android.json"
}
}
}{
"status": false,
"error_message": "This event is unsupported to view message copy. The supported events are ['Email Sent', 'SMS Sent', 'Notification Sent iOS', 'Notification Received Android', 'Notification Received Web']"
}{
"status": false,
"error": "Invalid data key"
}{
"title": "Server Error",
"description": "An unexpected error was encountered while processing this request. Please contact MoEngage Team",
"code": "BiaFuAzn-aefa0b0e-2c88-4106-8d07-0f0c53513e48"
}Rate Limit
The rate limit for this endpoint is 1000 RPM.Authorizations
Authentication is done via Basic Auth. This requires a base64-encoded string of your credentials in the format 'username:password'.
- Username: Use your MoEngage workspace ID (also known as the App ID). You can find it in the MoEngage dashboard at Settings > Account > APIs > Workspace ID (earlier app id).
- Password: Use your API Key, which you can find within the Data tile.
For more information on authentication and getting your credentials, refer here.
Headers
Body
application/json
The request body contains the parameters required to identify and retrieve the message.
This field denotes the campaign type.
Supported Values:
- Push: General Push Campaign, Autotrigger Campaign, Geo-fencing Campaign, Business Event Trigger Push Campaign
- SMS: sms, Business Event Trigger SMS Campaign
- Email: Email Campaign, Email Triggers, Business Event Trigger Email Campaign
- Alerts: Inform Email, Inform SMS, Inform Push
Available options:
General Push Campaign, Autotrigger Campaign, Geo-fencing Campaign, Business Event Trigger Push Campaign, sms, Business Event Trigger SMS Campaign, Email Campaign, Email Triggers, Business Event Trigger Email Campaign, Inform Email, Inform SMS, Inform Push