Test Campaign
This API sends a test Push or Email campaign to specific users or identifiers before launching it to your entire audience. You can only test campaigns created via the API, not campaigns created through the MoEngage dashboard.
Rate Limits
| Rate Limit Name | Rate Limit |
|---|---|
| Test campaign per second | The total number of test campaign requests per second per client allowed is 10. |
| Test campaign per minute | The total number of test campaign requests per minute per client allowed is 100. |
| Test campaign per hour | The total number of test campaign requests per hour per client allowed is 6000. |
- Breaching the limits will reject the request.
- Per hour and per day limits will consider the calculation based on the last hour and last 24 hrs respectively.
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 Campaign report/Business events/Custom templates/Catalog API/Inform Report tile.
For more information on authentication and getting your credentials, refer here.
Headers
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).
Body
Test campaign configuration including content and target test users. Note: Use the tabs below to select your campaign type. The schema will adapt based on the selected channel.
- Push Campaign
- Email Campaign
A unique identifier for this test request.
"test_push_12345"
The communication channel (automatically set to PUSH for this tab).
PUSH Contains the basic information about the Push campaign.
Contains the content and variations for the Push campaign.
Metadata for specifying test recipients for Push campaigns.
Override values for personalizing campaign content during testing.
Important:
- When you pass personalization details in the personalization_details object of this API, MoEngage uses those details to personalize the user attributes or event attributes present in the content instead of the attributes present in the user profile.
- You can use this API only for 10 users at a time.
- The same personalization details are used across all users. For example, you pass the first name as Dave in personalization details, you have used the first name in the content, and there are 10 users. In this case, all 10 users will get the same first name (Dave).
Response
Test campaign sent successfully
Response after successfully sending a test campaign.
Object containing test results for each identifier.
Each key is an identifier value with its delivery status.
{
"user_12345": { "status": "success" },
"user_67890": {
"status": "failed",
"failure_reason": "User not found"
}
}A success message.
"Test campaign created successfully"