curl --request POST \
--url https://api-{dc}.moengage.com/core-services/v1/campaigns \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'MOE-APPKEY: <moe-appkey>' \
--data '
{
"request_id": "push_req_12345",
"channel": "PUSH",
"campaign_delivery_type": "ONE_TIME",
"created_by": "john.doe@example.com",
"basic_details": {
"name": "Summer Sale Push",
"tags": [
"activation",
"sale"
],
"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": "50% Off Summer Sale!",
"message": "Dont miss out on our biggest sale",
"default_click_action": "DEEPLINKING",
"default_click_action_value": "https://example.com/sale",
"key_value_pairs": [
{
"key": "promo_code",
"value": "SUMMER50"
}
]
}
},
"ios": {
"template_type": "BASIC",
"basic_details": {
"title": "50% Off Summer Sale!",
"message": "Dont miss out on our biggest sale",
"default_click_action": "DEEPLINKING",
"default_click_action_value": "https://example.com/sale"
}
}
}
}
},
"segmentation_details": {
"included_filters": {
"filter_operator": "and",
"filters": [
{
"filter_type": "user_attributes",
"data_type": "string",
"name": "uid",
"operator": "exists"
}
]
}
},
"scheduling_details": {
"delivery_type": "ASAP"
},
"delivery_controls": {
"campaign_throttle_rpm": 50000,
"ignore_frequency_capping": false
}
}
'{
"campaign_id": "camp_abc123xyz"
}Create Campaign
This API creates a new Push or Email campaign in MoEngage with specified content, audience, and delivery settings.
curl --request POST \
--url https://api-{dc}.moengage.com/core-services/v1/campaigns \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'MOE-APPKEY: <moe-appkey>' \
--data '
{
"request_id": "push_req_12345",
"channel": "PUSH",
"campaign_delivery_type": "ONE_TIME",
"created_by": "john.doe@example.com",
"basic_details": {
"name": "Summer Sale Push",
"tags": [
"activation",
"sale"
],
"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": "50% Off Summer Sale!",
"message": "Dont miss out on our biggest sale",
"default_click_action": "DEEPLINKING",
"default_click_action_value": "https://example.com/sale",
"key_value_pairs": [
{
"key": "promo_code",
"value": "SUMMER50"
}
]
}
},
"ios": {
"template_type": "BASIC",
"basic_details": {
"title": "50% Off Summer Sale!",
"message": "Dont miss out on our biggest sale",
"default_click_action": "DEEPLINKING",
"default_click_action_value": "https://example.com/sale"
}
}
}
}
},
"segmentation_details": {
"included_filters": {
"filter_operator": "and",
"filters": [
{
"filter_type": "user_attributes",
"data_type": "string",
"name": "uid",
"operator": "exists"
}
]
}
},
"scheduling_details": {
"delivery_type": "ASAP"
},
"delivery_controls": {
"campaign_throttle_rpm": 50000,
"ignore_frequency_capping": false
}
}
'{
"campaign_id": "camp_abc123xyz"
}Rate Limits
| Rate Limit Name | Rate Limit |
|---|---|
| Create campaign per second | The total number of create campaign requests per second per client allowed is 5. |
| Create campaign per minute | The total number of create campaign requests per minute per client allowed is 25. |
| Create campaign per hour | The total number of create campaign requests per hour per client allowed is 100. |
Campaign Creation Limits
You can create 5 campaigns per minute, 25 campaigns per hour, and 100 campaigns per day.- Higher limit (Total Calls): The system permits a higher volume of total API calls (for example, 120 calls) to accommodate potential failures or retries.
- Minimum limit (Campaign Creation Limits): The system maintains a stricter quota for actual successful creations (100 campaigns per day). Example: If a client submits 120 requests and 20 fail, they successfully generate exactly 100 campaigns. Because the system applies the most restrictive threshold, the 100 successful operations trigger the quota limit, and the system issues a rate limit breach warning regardless of the total API calls made.
- 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
You can configure campaign content, audience, and scheduling details. 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 campaign creation request.
Important: After successful campaign creation, do not reuse this request_id for the next 1 hour. If campaign creation fails, you can immediately retry with the same request_id.
"push_req_12345"
The communication channel for this campaign.
PUSH The delivery type of the campaign.
ONE_TIME, PERIODIC, EVENT_TRIGGERED, BUSINESS_EVENT_TRIGGERED, DEVICE_TRIGGERED, LOCATION_TRIGGERED, BROADCAST_LIVE_ACTIVITY The email ID of the user creating this campaign.
"john.doe@example.com"
Contains the basic information about the Push campaign.
Show child attributes
Show child attributes
Contains the content and variations for the Push campaign.
Show child attributes
Show child attributes
Defines the target audience for the campaign.
Show child attributes
Show child attributes
Defines when the campaign should be sent. All date-time values must be passed in UTC.
Show child attributes
Show child attributes
Controls for Push campaign delivery behavior.
Show child attributes
Show child attributes
Advanced campaign settings.
Show child attributes
Show child attributes
Trigger condition details for Push event-triggered campaigns.
Required for EVENT_TRIGGERED campaigns.
Show child attributes
Show child attributes
Configuration for tracking campaign conversion goals.
Show child attributes
Show child attributes
Configuration for control groups.
Show child attributes
Show child attributes
UTM parameters for tracking campaign performance.
Show child attributes
Show child attributes
Response
Campaign created successfully
The unique ID of the newly created campaign. Store this for future reference.
"camp_12345abc"
Was this page helpful?