{
"campaign_id": "camp_abc123xyz"
}{
"error": {
"code": "400 Bad Request",
"message": "request_id key is mandatory field",
"target": "request_id",
"details": [
{
"target": "request_id",
"message": "request_id key is mandatory field"
}
],
"request_id": "11"
}
}{
"error": {
"code": "401 Authentication error",
"message": "Authentication required",
"details": [
{
"code": "InvalidValue",
"target": "APP_SECRET_KEY",
"message": [
{
"code": "InvalidValue",
"target": "APP_SECRET_KEY",
"message": "Invalid APP_SECRET_KEY is provided."
}
]
}
],
"request_id": ""
}
}{
"error": {
"code": "429 conflict",
"message": "rate_limit",
"target": "",
"details": [
{
"target": "rate_limit",
"message": "Rate limiting breached"
}
],
"request_id": "3UXNNGsqV"
}
}{
"error": {
"code": "500 Internal Server Error",
"message": "Something went wrong. Please contact Moengage team",
"target": "string",
"details": [
{
"message": "Expecting value: line 1 column 1 (char 0)",
"target": ""
}
]
}
}Create Campaign
Creates a new Push or Email campaign in MoEngage with specified content, audience, and delivery settings.
{
"campaign_id": "camp_abc123xyz"
}{
"error": {
"code": "400 Bad Request",
"message": "request_id key is mandatory field",
"target": "request_id",
"details": [
{
"target": "request_id",
"message": "request_id key is mandatory field"
}
],
"request_id": "11"
}
}{
"error": {
"code": "401 Authentication error",
"message": "Authentication required",
"details": [
{
"code": "InvalidValue",
"target": "APP_SECRET_KEY",
"message": [
{
"code": "InvalidValue",
"target": "APP_SECRET_KEY",
"message": "Invalid APP_SECRET_KEY is provided."
}
]
}
],
"request_id": ""
}
}{
"error": {
"code": "429 conflict",
"message": "rate_limit",
"target": "",
"details": [
{
"target": "rate_limit",
"message": "Rate limiting breached"
}
],
"request_id": "3UXNNGsqV"
}
}{
"error": {
"code": "500 Internal Server Error",
"message": "Something went wrong. Please contact Moengage team",
"target": "string",
"details": [
{
"message": "Expecting value: line 1 column 1 (char 0)",
"target": ""
}
]
}
}Supported Channels
- PUSH: Android, iOS, Web push notifications
- EMAIL: Email campaigns
Rate Limits
- 5 campaigns per minute
- 25 campaigns per hour
- 100 campaigns per day
Authorizations
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:
- Navigate to Settings → Account → APIs in the MoEngage Dashboard
- Username: Copy the Workspace ID (earlier app id)
- Password: Copy the API key from the Campaign report/Business events/Custom templates tile
Headers
This is the workspace ID (earlier APP ID) of your MoEngage workspace.
You can find your MoEngage Workspace ID in the MoEngage Dashboard: Settings → Account → APIs → Workspace ID (earlier app id)
Body
Campaign configuration including content, audience, and scheduling details. The schema will adapt based on the selected channel (PUSH or EMAIL).
- 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.
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
Controls for Push campaign delivery behavior.
Show child attributes
Show child attributes
Advanced campaign settings.
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?