curl --request POST \
--url https://api-{dc}.moengage.com/v5/personalizations/previews \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"request_id": "req-8841",
"personalization_content": {
"payload": {
"subject": "Hello {{UserAttribute[\"first_name\"] | default(\"there\")}}",
"body": "Welcome {{UserAttribute[\"second_name\"]}}!"
}
},
"user_details": {
"identifier": "email",
"identifier_value": "[email protected]"
},
"personalization_details": {
"channel": "EMAIL",
"event_name": "MOE_APP_OPENED",
"user_attributes": {
"first_name": "Ada"
}
}
}
'{
"personalized_content": {
"payload": {
"subject": "Hello Ada",
"body": "Welcome Ada!"
}
}
}Personalized Preview (V5)
Resolves Jinja personalization tokens (UserAttribute, EventAttribute, ContentBlock, ContentApi, and ProductSet) inside a content payload or a saved custom template, and returns the fully rendered output for the specified user — without sending a message.
POST
/
v5
/
personalizations
/
previews
curl --request POST \
--url https://api-{dc}.moengage.com/v5/personalizations/previews \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"request_id": "req-8841",
"personalization_content": {
"payload": {
"subject": "Hello {{UserAttribute[\"first_name\"] | default(\"there\")}}",
"body": "Welcome {{UserAttribute[\"second_name\"]}}!"
}
},
"user_details": {
"identifier": "email",
"identifier_value": "[email protected]"
},
"personalization_details": {
"channel": "EMAIL",
"event_name": "MOE_APP_OPENED",
"user_attributes": {
"first_name": "Ada"
}
}
}
'{
"personalized_content": {
"payload": {
"subject": "Hello Ada",
"body": "Welcome Ada!"
}
}
}Rate Limit
| Window | Max requests |
|---|---|
| 1 s | 100 |
| 10 s | 1,000 |
| 60 s | 6,000 |
Personalization Support
- User attributes
- Event attributes
- Custom templates
- Content blocks
- Content APIs
- Product sets
承認
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). Find it in the MoEngage dashboard at Settings > Account > API keys.
- Password: Use an API key from Settings > Account > API keys.
Refer to API Key Dashboard for details on creating and managing API keys.
ヘッダー
ボディ
application/json
Supply the target user (optional) and either an inline content payload or a reference to a saved custom template.