Skip to main content
POST
/
campaigns
/
test
curl --request POST \ --url https://api-{dc}.moengage.com/core-services/v1/campaigns/test \ --header 'Authorization: Basic <encoded-value>' \ --header 'Content-Type: application/json' \ --header 'MOE-APPKEY: <moe-appkey>' \ --data ' { "request_id": "test_push_123", "channel": "PUSH", "basic_details": { "name": "Flash Sale Push Test", "platforms": [ "ANDROID", "IOS" ], "platform_specific_details": { "android": { "push_amp_plus_enabled": true }, "ios": { "send_to_all_eligible_device": true, "exclude_provisional_push_devices": false, "send_to_only_provisional_push_enabled_devices": false } } }, "campaign_content": { "content": { "push": { "android": { "template_type": "BASIC", "basic_details": { "notification_channel": "general", "title": "Test: Flash Sale!", "message": "Testing message content", "default_click_action": "DEEPLINKING", "default_click_action_value": "https://example.com/sale" } }, "ios": { "template_type": "BASIC", "basic_details": { "title": "Test: Flash Sale!", "message": "Testing message content", "default_click_action": "DEEPLINKING", "default_click_action_value": "https://example.com/sale" } } } } }, "test_campaign_meta": { "identifier": "USER_ATTRIBUTE_UNIQUE_ID", "identifier_values": [ "user_12345" ] } } '
{ "data": { "user_12345": { "status": "success" } }, "message": "Test campaign created successfully" }
Supported Channels
  • PUSH: Test Push notification campaigns
  • EMAIL: Test Email campaigns
Important Information
  • You can only test campaigns created via the API, not campaigns created through the MoEngage Dashboard
  • For Email: Maximum 10 users can be tested at a time
  • If using EMAIL identifier, content will not be personalized with user profile data
Personalization Behavior
  • When you pass personalization_details, MoEngage uses those values instead of the user’s actual profile data
  • The same personalization values apply to all test recipients
  • If you pass only a subset of attributes, remaining values are picked from the user profile
Use the Body tabs below to select your campaign type:
  • Select Push Campaign tab for testing Push notifications
  • Select Email Campaign tab for testing Email campaigns

Authorizations

Authorization
string
header
required

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:

  1. Navigate to SettingsAccountAPIs in the MoEngage Dashboard
  2. Username: Copy the Workspace ID (earlier app id)
  3. Password: Copy the API key from the Campaign report/Business events/Custom templates tile

Headers

MOE-APPKEY
string
required

This is the workspace ID (earlier APP ID) of your MoEngage workspace.

You can find your MoEngage Workspace ID in the MoEngage Dashboard: SettingsAccountAPIsWorkspace ID (earlier app id)

Body

application/json

Test campaign configuration including content and target test users.

request_id
string
required

A unique identifier for this test request.

Example:

"test_push_12345"

channel
enum<string>
required

The communication channel (automatically set to PUSH for this tab).

Available options:
PUSH
basic_details
object
required

Contains the basic information about the Push campaign.

campaign_content
object
required

Contains the content and variations for the Push campaign.

test_campaign_meta
object
required

Metadata for specifying test recipients for Push campaigns.

personalization_details
object

Override values for personalizing campaign content during testing.

Important

When you pass personalization details, MoEngage uses these values to personalize user/event attributes in the content instead of using actual user profile data.

Response

Test campaign sent successfully

Response after successfully sending a test campaign.

data
object

Object containing test results for each identifier.

Each key is an identifier value with its delivery status.

Example:
{
  "user_12345": { "status": "success" },
  "user_67890": {
    "status": "failed",
    "failure_reason": "User not found"
  }
}
message
string

A success message.

Example:

"Test campaign created successfully"