Iterable's Stored Messages feature saves an exact copy of each rendered message in your cloud storage bucket after Iterable confirms it was sent to the delivery provider.
This archive includes messages for the channels you've configured (Email, SMS, and/or Push).
Continue reading this article to learn more about the file names and payload structures for these messages.
TIP
Stored Messages is an add-on feature. Talk to your Iterable account manager about adding Stored Messages to your plan.
# In this article
# Viewing stored messages
To view the messages in your archive, you can access the JSON files directly in your cloud storage provider. There, you have full control over data storage and access.
Messages are stored as GZIP-compressed JSON files.
# File names for stored messages
Iterable saves each message using a standardized naming convention:
<message_medium>/<project_id>/SHA256(<recipient_email> or <user_id>)/<campaign_id>/<message_id>.json.gz
-
message_medium: Enables grouping messages by medium -
project_idandrecipient_emailoruser_id: Allows filtering messages for a specific user within a project- SHA256 hashing is applied to the user ID or recipient email for privacy
-
campaign_id: Campaign ID can be used to filter messages by campaign -
message_id: Iterable-generated message ID
An example filename:
email/12345/b4c9a289323b21a01c3e940f150eb9b8c542587f1abfd8f0e1cc1ffc5e475514/1234567/9c438a20d26e4e9f8ad4edea23f811cd.json.gz
# JSON payloads for stored messages
IMPORTANT
Event payloads and data schemas vary depending on the circumstances of the specific event (such as how it was triggered), how your project is configured, and the feature used to access the data.
The schemas provided in this article are specific to Stored Messages, which may vary from schemas for other data access features like System Webhooks and Export APIs.
# Email campaign payload
The payload structure for each .json.gz file for email messages is as follows:
(Annotations are included for documentation purposes only.)
{ "projectId": "<PROJECT_ID>", "organizationId": "<ORGANIZATION_ID>", "messageId": "<MESSAGE_ID>", "recipientEmail": "<RECIPIENT_EMAIL>", "recipientUserId": "<RECIPIENT_USER_ID>", // (Optional) "campaignId": "<CAMPAIGN_ID>", "campaignName": "<CAMPAIGN_NAME>", "templateId": "<TEMPLATE_ID>", "messageRenderedAt": "<MESSAGE_RENDERED_AT>", "messageSentAt": "<MESSAGE_SENT_AT>", "channelType": "<CHANNEL_TYPE>", "messageMedium": "<MESSAGE_MEDIUM>", "messageTypeId": "<MESSAGE_TYPE_ID>", "journeyId": "<JOURNEY_ID>", // (Optional) "content": { "fromName": "<FROM_NAME>", "subject": "<SUBJECT>", "replyTo": "<REPLY_TO_EMAIL>", "plainText": "<PLAIN_TEXT>", "ccEmails": [], "bccEmails": [], "fromEmail": "<FROM_EMAIL>", "html": "<HTML_CONTENT>", "preheaderText": "<PREHEADER_TEXT>" }, "attachments": [], "headers": { "X-Custom-Header": "<CUSTOM_HEADER_VALUE>" } }
Below is a full sample message payload for email:
{ "projectId": 12345, "organizationId": 12345, "messageId": "9c438a20d26e4e9f8ad4edea23f811cd", "recipientEmail": "user@example.com", "recipientUserId": "2f98cb14-f011-460a-9448-0420a06244c6", "campaignId": 1234567, "campaignName": "Example Campaign Name", "templateId": 1234567, "messageRenderedAt": "2025-04-12T15:57:00.000000Z", "messageSentAt": "2025-04-12T15:57:08.000000Z", "channelType": "Marketing", "messageMedium": "Email", "messageTypeId": 12345, "journeyId": 1234567, "content": { "fromName": "My Sender", "subject": "My Test Subject Line", "replyTo": "reply+to@example.com", "plainText": "Example Campaign Test\n\nThis email was sent to user@example.com. \n\nDon't want to receive these emails anymore? Unsubscribe: https://links.example.com/e/encryptedUnsubscribe?...", "ccEmails": ["cc+test@example.com"], "bccEmails": [], "fromEmail": "from@example.com", "html": "<!DOCTYPE html><html><head> </head><body> <span style=\"color:transparent;visibility:hidden;display:none;opacity:0;height:0;width:0;font-size:0;\"></span><img src=\"https://links.example.com/...\" style=\"border:0;width:1px;height:1px;border-width:0px!important;display:none!important;line-height:0!important;\" width=\"1\" height=\"1\" /><div> Example Campaign Test </div><table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tbody><tr><td valign=\"top\"><span style=\"font-family:Arial;font-size:12px;line-height:20px;color:#8E8E8E;\">This email was sent to <a href=\"mailto:user@example.com\" target=\"_blank\">user@example.com</a>. <br /><br />Don't want to receive these emails anymore? <a href=\"https://links.example.com/e/encryptedUnsubscribe?...\" name=\"unsubscribe\" target=\"_blank\"><span style=\"color:#8E8E8E;text-decoration:underline;color:#8e8e8e\">Unsubscribe</span></a></span></td></tr><tr><td valign=\"top\"><span style=\"font-family:Arial;font-size:12px;line-height:12px;color:#8E8E8E;\">Example Project </span></td></tr></tbody></table></body></html>", "preheaderText": "Example preheader text." }, "attachments": [], "headers": { "Feedback-ID": "0000000:0000000:0000:iterable", "X-Feedback-ID": "0000000:0000000:0000:iterable", "X-Campaign-ID": "0000000", "List-Unsubscribe": "https://links.example.com/e/encryptedUnsubscribe?...mailto:unsubscribe+0000000+0000000@unsubscribe.example.com", "X-Message-ID": "43cd094e9d8f4c3191feb11cecebaaeb" } }
# Push campaign payload
The payload structure for each .json.gz file for push messages is as follows:
(Annotations are included for documentation purposes only.)
{ "projectId": "<PROJECT_ID>", "organizationId": "<ORGANIZATION_ID>", "messageId": "<MESSAGE_ID>", "recipientEmail": "<RECIPIENT_EMAIL>", // (Optional) "recipientUserId": "<RECIPIENT_USER_ID>", // (Optional) "campaignId": "<CAMPAIGN_ID>", // (Optional) "campaignName": "<CAMPAIGN_NAME>", // (Optional) "templateId": "<TEMPLATE_ID>", // (Optional) "messageRenderedAt": "<MESSAGE_RENDERED_AT>", "messageSentAt": "<MESSAGE_SENT_AT>", "channelType": "<CHANNEL_TYPE>", "messageMedium": "<MESSAGE_MEDIUM>", "messageTypeId": "<MESSAGE_TYPE_ID>", // (Optional) "journeyId": "<JOURNEY_ID>", // (Optional) "isCustomMTA": false, // true when sent through an Iterable Custom MTA "content": { "deviceToken": "<DEVICE_TOKEN>", "devicePlatform": "<APNS | APNS_SANDBOX | GCM>", "deviceApplicationName": "<DEVICE_APPLICATION_NAME>", "devicePlatformEndpoint": "<DEVICE_PLATFORM_ENDPOINT>", // (Optional) "notificationTitle": "<NOTIFICATION_TITLE>", // (Optional) "notificationText": "<NOTIFICATION_TEXT>", // Body text "badge": "<BADGE>", // (Optional) "payload": { /* custom JSON payload */ }, // (Optional) "sound": "<SOUND>", // (Optional) "contentAvailable": false, // true for silent/background "deeplink": { // (Optional) "ios": "<IOS_DEEPLINK>", "android": "<ANDROID_DEEPLINK>" }, "attachmentUrl": "<ATTACHMENT_URL>", // (Optional) "category": "<CATEGORY>", // (Optional) "defaultAction": { // (Optional) "type": "<TYPE>", "data": "<DATA>" }, "actionButtons": [ // (Optional) { "identifier": "<IDENTIFIER>", "title": "<TITLE>", "buttonType": { // (Optional) "value": "<VALUE>", "displayName": "<DISPLAY_NAME>" }, "actionType": { // (Optional) "type": "<TYPE>", "data": "<DATA>" }, "openApp": true, // (Optional) "requiresUnlock": false, // (Optional) "inputPlaceholder": "<INPUT_PLACEHOLDER>", // (Optional) "inputTitle": "<INPUT_TITLE>", // (Optional) "actionIcon": { // (Optional) "iconType": "<ICON_TYPE>", "imageName": "<IMAGE_NAME>" } } ], "relevanceScore": 0.5, // (Optional) "interruptionLevel": "<INTERRUPTION_LEVEL>" // (Optional) - iOS only } }
Below is a full sample message payload for push:
{ "projectId": 12345, "organizationId": 12345, "messageId": "9c438a20d26e4e9f8ad4edea23f811cd", "recipientEmail": "user@example.com", "recipientUserId": "2f98cb14-f011-460a-9448-0420a06244c6", "campaignId": 1234567, "campaignName": "Example Campaign Name", "templateId": 1234567, "messageRenderedAt": "2025-04-12T15:57:00.000000Z", "messageSentAt": "2025-04-12T15:57:08.000000Z", "channelType": "Marketing", "messageMedium": "Push", "messageTypeId": 12345, "journeyId": 1234567, "isCustomMTA": false, "content": { "deviceToken": "a1b2c3d4e5f60000000000000000000000000000000000000000000000000000", "devicePlatform": "APNS", "deviceApplicationName": "com.example.myapp", "devicePlatformEndpoint": "arn:aws:sns:us-east-1:000000000000:endpoint/APNS/com.example.myapp/a1b2c3d4-0000-0000-0000-example000000", "notificationTitle": "Example Campaign Test", "notificationText": "Example push notification text.", "badge": "1", "payload": { "campaignType": "promotional", "offerCode": "SAVE20" }, "sound": "default", "contentAvailable": false, "deeplink": { "ios": "myapp://example/shop", "android": "myapp://example/shop" }, "attachmentUrl": "https://example.com/promo-image.jpg", "category": "promotional", "defaultAction": { "type": "openUrl", "data": "https://example.com/shop?code=SAVE20" }, "actionButtons": [ { "identifier": "VIEW_OFFER", "title": "View Offer", "buttonType": { "value": "default", "displayName": "Default" }, "actionType": { "type": "openUrl", "data": "https://example.com/shop?code=SAVE20" }, "openApp": true, "requiresUnlock": false, "inputPlaceholder": "Type here...", "inputTitle": "Submit", "actionIcon": { "iconType": "system", "imageName": "star" } } ], "relevanceScore": 0.75, "interruptionLevel": "active" } }
# SMS campaign payload
The payload structure for each .json.gz file for SMS/MMS messages is as follows:
(Annotations are included for documentation purposes only.)
{ "projectId": "<PROJECT_ID>", "organizationId": "<ORGANIZATION_ID>", "messageId": "<MESSAGE_ID>", "recipientEmail": "<RECIPIENT_EMAIL>", // (Optional) "recipientUserId": "<RECIPIENT_USER_ID>", // (Optional) "campaignId": "<CAMPAIGN_ID>", // (Optional) "campaignName": "<CAMPAIGN_NAME>", // (Optional) "templateId": "<TEMPLATE_ID>", // (Optional) "messageRenderedAt": "<MESSAGE_RENDERED_AT>", "messageSentAt": "<MESSAGE_SENT_AT>", "channelType": "<CHANNEL_TYPE>", "messageMedium": "SMS", "messageTypeId": "<MESSAGE_TYPE_ID>", // (Optional) "journeyId": "<JOURNEY_ID>", // (Optional) "smsProvider": "<SMS_PROVIDER>", // e.g. Twilio, Telnyx "content": { "fromPhoneNumber": "<FROM_PHONE_NUMBER>", "senderType": "<LongCode | ShortCode | MessagingService>", "recipientPhoneNumber": "<RECIPIENT_PHONE_NUMBER>", "text": "<TEXT>", // Final rendered SMS/MMS body "imageUrl": "<IMAGE_URL>", // (Optional) - MMS image "isMMS": true, // true for MMS, false for SMS "vCardUrl": "<VCARD_URL>", // (Optional) - Iterable-generated URL for the SMS verified contact card (VCF) attachment "billingParty": "<FirstParty | ThirdParty>" } }
Below is a full sample message payload for SMS/MMS:
{ "projectId": 12345, "organizationId": 12345, "messageId": "9c438a20d26e4e9f8ad4edea23f811cd", "recipientEmail": "user@example.com", "recipientUserId": "2f98cb14-f011-460a-9448-0420a06244c6", "campaignId": 1234567, "campaignName": "Example Campaign Name", "templateId": 1234567, "messageRenderedAt": "2025-04-12T15:57:00.000000Z", "messageSentAt": "2025-04-12T15:57:08.000000Z", "channelType": "Marketing", "messageMedium": "SMS", "messageTypeId": 12345, "journeyId": 1234567, "smsProvider": "Twilio", "content": { "fromPhoneNumber": "+14155550132", "senderType": "LongCode", "recipientPhoneNumber": "+14155550199", "text": "Example Campaign Test: Don't miss out on what's new. \n\nReply STOP to unsubscribe.", "imageUrl": "https://example.com/promo-image.jpg", "isMMS": true, "vCardUrl": "https://links.example.com/vcard/a1b2c3d4e5f6/00000/ExampleBrand.vcf?website=https%3A%2F%2Fexample.com&email=contact%40example.com&imageUrl=https%3A%2F%2Fexample.com%2Flogo.png", "billingParty": "FirstParty" } }