Test Campaigns
Personalized Preview
This API shows a preview of personalized content for a specific user before sending a Push, Email, or SMS campaign. This API retrieves personalized message content with all user/event attributes resolved. Use this API to validate your personalization logic and see exactly how content will appear to specific users before launching campaigns.
post/personalization/preview
Request
- Base URLhttps://api-01.moengage.com/core-services/v1
- AuthHTTP basic
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
MOE-APPKEYstring required
This is the Workspace ID of your MoEngage account that must be passed with the request. You can find it in the MoEngage dashboard at Settings > Account > APIs > Workspace ID (earlier app id).
data-compressionboolean
Whether to pass the payload in compressed format.
Set to true to send compressed payload.
Request body
Example request
{
"request_id": "preview_req_12345",
"personalization_content": {
"payload": {
"email_html": "<!DOCTYPE html><html><body><p>Hi {{UserAttribute['First Name']}}</p></body></html>"
},
"custom_template_data": {
"template_id": "5b7d04c6-8ddc-4957-80d9-c67266079609",
"version": "1"
}
},
"user_details": {
"identifier": "ID",
"identifier_value": "USER_12345"
},
"personalization_details": {
"event_name": "App_Opened",
"user_attributes": {
"First Name": "John",
"Last Name": "Doe",
"Gender": "Male"
},
"event_attributes": {
"App_Version": "1.0.2",
"Campaign Name": "Summer Sale"
}
}
}Response
Successfully retrieved personalized content preview
Changes
No recorded changes to this operation across all 1 revision of this API.