Personalized Preview
Preview personalized content for a specific user before sending campaigns. This API retrieves personalized message content with all user/event attributes resolved.
- EMAIL - Email content preview
- PUSH - Push notification preview
- SMS - SMS message preview
- User attributes
- Event attributes
- Custom templates
- Content blocks
- Content APIs
- Product sets
- When you pass personalization_details, MoEngage uses those values to personalize content instead of actual user profile data
- Attributes must exist in the MoEngage Dashboard
- If an attribute doesn’t exist and default value is not “MOE_NOT_SEND”, it will appear empty
- Event attributes can be used when the same event is used for the campaign
- Either
payloadorcustom_template_datamust be provided in personalization_content
Authorizations
Authentication is done via Basic Auth. The username is your Workspace ID (earlier APP ID) and the password is your API Key. The value is a base64 encoding of 'username:password'.
How to obtain credentials:
- Navigate to Settings → Account → APIs in the MoEngage Dashboard
- Username: Copy the Workspace ID (earlier app id)
- Password: Copy the API key from the Campaign report/Business events/Custom templates tile
Headers
This is the workspace ID (earlier APP ID) of your MoEngage workspace.
You can find your MoEngage Workspace ID in the MoEngage Dashboard: Settings → Account → APIs → Workspace ID (earlier app id)
Whether to pass the payload in compressed format.
Set to true to send compressed payload.
Body
Personalization preview request with content and user details.
Request to preview personalized content for a specific user.
A unique identifier for this personalization preview request.
"preview_req_12345"
The content to personalize.
Note: Either payload or custom_template_data must be provided.
Override values for personalization.
Information about the user to preview for.
Note: If using user_details, both identifier and identifier_value are mandatory.
Response
Successfully retrieved personalized content preview
Response containing the personalized content.
The personalized content with all attributes resolved.