You can use the Create Campaigns API to create a campaign in MoEngage.
info |
Information Currently, you can use this API to create Email campaigns only. |
API Endpoint
POST https://api-0X.moengage.com/core-services/v1/campaigns
Each customer is hosted on a different data center; you can find your data center number (value of X) by checking the data center and API endpoint mapping page.
Authentication
The API request will be authenticated through Basic Authentication. Basic Authentication sends a Base64-encoded string containing your username and password with every API request. It encodes a 'username:password' string in Base64 and appends the encoded string with 'Basic '. This string is included in the authorization header as shown below:
{"Authorization":"Basic bmF2ZWVua3VtYXI6bW9lbmdhZ2U="}
You can obtain the username and password details from the MoEngage Dashboard.
- Navigate to Settings -> Account -> APIs.
- Copy the following details:
- Username: Under Workspace ID (earlier app id), click the copy icon to copy the username.
- Password: In the API keys section, click the copy icon in the Campaign report/Business events/Custom templates tile to copy the API key.
- Use these details to authenticate the API requests.
Request Headers
Key | Required | Sample Values | Description |
---|---|---|---|
Content-Type |
Required |
{"Content-Type": "application/json"} |
Set the Content-Type header to application/json. |
Authorization |
Required |
{"Authorization": "Basic bmF2ZWVua3VtYXI6bW9lbmdhZ2U=="} |
This authentication parameter, used for access control, must be passed in the request. To generate the authentication header, refer to Authentication. |
MOE-APPKEY | Required |
{“MOE-APPKEY”: “Workspace ID”} |
This is the workspace ID (earlier APP ID) of your MoEngage workspace. The MOE-APPKEY has to be passed in the request. You can find your MoEngage Workspace ID in the MoEngage Dashboard:
Settings -> Account -> APIs -> Workspace ID (earlier app id) For more information, refer to Authentication. |
Request Body
Key | Required | Values | Description |
---|---|---|---|
request_id
|
Required | String |
This field denotes the request ID that you must pass to create the campaign. Note: After you create a campaign successfully using a request ID, do not use it again for the next 1 day. If campaign creation is unsuccessful, you can use the same request ID immediately again. |
channel
|
Required | String |
This field denotes the type of channel. Currently, the supported value is: |
campaign_delivery_type
|
Required | String |
This field denotes the type of campaign based on delivery. Supported values are:
|
created_by
|
Required | String | This field denotes the Email ID of the user who created the campaign. Supported value is email ID only. |
basic_details | Required | JSON Object | This object contains the basic details of the campaign. For more information, refer to Basic Details. |
trigger_condition | Optional | JSON Object |
This object contains the trigger condition details. For more information, refer to Trigger Conditions. Note: This object is required for event-triggered campaigns. |
segmentation_details | Required | JSON Object |
This object contains the segmentation details. For more information, refer to Segmentation Details. |
control_group_details | Optional | JSON Object | This object contains the control group details. For more information, refer to Control Group Details. |
utm_params | Optional | JSON Object | This object contains the UTM parameters details. For more information, refer to UTM Parameters. |
connector | Required | JSON Object |
This object contains the connector details. For more information, refer to Connector Details. |
campaign_content | Required | JSON Object | This object contains the campaign content. For more information, refer to Campaign Content. |
scheduling_details | Required | JSON Object | This object contains the scheduling details. For more information, refer to Scheduling Details. |
conversion_goal_details | Optional | JSON Object | This object contains the conversion goal details. For more information, refer to Conversion Goal Details. |
delivery_controls | Optional | JSON Object | This object contains the delivery controls details. For more information, refer to Delivery Controls. |
Basic Details
The basic_details JSON object contains the following information:
Key | Required | Values | Description |
---|---|---|---|
business_event | Optional | String |
This field denotes the business event to be mapped to the campaign. Note: This field is required for business event-triggered campaigns. |
content_type | Required | String |
This field denotes the type of content in the campaign. Supported values are:
|
name | Required | String | This field denotes the name of the campaign. |
subscription_category | Optional | String |
This field denotes the type of communication that your customer receives from your brand. This would help you target only those users who have opted-in to receive communication about a specific category. For more information, refer to Subscription Categories. Note: This field is mandatory if you are creating a promotional email campaign. |
tags | Optional | Array |
This field provides context about the campaigns and describes the nature of the campaign or the campaign's central theme. |
team | Optional | String | This field denotes the name of a group of users collaborating on the same campaign. For more information, refer to Teams. |
user_attribute_identifier | Required | String |
This field denotes the user attribute that stores the email address. MoEngage standard user attribute identifier is MOE_EMAIL_ID. This is a standard attribute where the name is provided by MoEngage and the value is provided by the client. |
Trigger Conditions
The trigger_condition is used for Event-Triggered campaigns. This JSON object contains the following information:
info |
Information The trigger_condition object is required only for Event-Triggered campaigns. |
Key | Required | Values | Description |
---|---|---|---|
included_filters | Optional | JSON Object | This object denotes the segmentation filters that help you choose the trigger condition for your campaign. |
secondary_included_filters | Optional | JSON Object |
This object denotes the segmentation filters that help you choose the secondary trigger condition for your campaign. Note: Secondary include filters will be used when the secondary events are used in the event triggered campaigns. |
trigger_delay_type | Optional | String |
This field denotes the type of triggered delay. Supported values are:
Note: When you pass DELAY value in this parameter, the following fields are mandatory:
|
trigger_delay_value | Optional | Integer | This field denotes the value of the triggered delay. |
trigger_delay_granularity | Optional | String |
This field denotes the granularity of the triggered delay. Supported values are:
|
trigger_relation | Optional | String |
This field denotes the trigger relation with delay. Supported values are:
|
trigger_attr | Optional | JSON Object | This object denotes the attribute value of the trigger. |
Segmentation Details
The <> JSON object contains the following information:
Key | Required | Values | Description |
---|---|---|---|
excluded_filters | Optional | JSON Object | This field contains the exclusion filtering criteria used for segmentation. The users satisfying this set of filters will be excluded from the segment. |
included_filters | Optional | JSON Object |
This field contains the inclusion filtering criteria used for segmentation. The users satisfying this set of filters will be included in the segment. |
is_all_user_campaign | Optional | Boolean |
This field indicates if all users should be included in the campaign. |
info |
Information For more information on the detailed segmentation payload and supported fields, refer to Create Custom Segment. |
Control Group Details
The control_group_details JSON object contains the following information:
Key | Required | Values | Description |
---|---|---|---|
is_campaign_control_group_enabled | Optional | Boolean | This field denotes whether the campaign control group is enabled or not. |
campaign_control_group_percentage | Optional | Integer |
This field denotes the percentage of users added to an exclusion list. Note: If is_campaign_control_group_enabled is True, campaign_control_group_percentage field is required. |
is_global_control_group_enabled | Optional | Boolean | This field denotes whether the global control group is enabled or not. |
UTM Parameters
The utm_params JSON object contains the following information:
Key | Required | Values | Description |
---|---|---|---|
utm_source | Required | String |
This field denotes the source of the traffic. It helps to track where the traffic came from. The source can be a website, app, or link. For example, YouTube, Instagram, Google. Note: When you are using the utm_params JSON object, this field is required. |
utm_medium | Required | String |
This field denotes the channel type. It helps to track the channel from where the user came. For example, Push, SMS, Email. Note: When you are using the utm_params JSON object, this field is required. |
utm_campaign | Optional | String |
This field denotes the name of the campaign. It helps to track the performance of a specific campaign. For example, Newyear, Bigbillionday. |
utm_term | Optional | String |
This field denotes search terms for paid traffic. It helps to search the keyword or term that led to the audience visiting your site. For example, Mobile+sale. |
utm_content | Optional | String |
This field denotes the content. It is the element that differentiates links pointing to the same URL. It helps to identify the exact element on your campaign that was clicked. It is useful for for A/B testing. For example, banner, video, product image. |
utm_custom | Optional | String |
This field denotes the custom UTM parameter. You can pass a maximum of five custom UTM parameters. |
Connector Details
The connector JSON object contains the following information:
Key | Required | Values | Description |
---|---|---|---|
connector_name | Required | String | This field indicates the connector service you are using. |
connector_type | Required | String | This field indicates the type of connector you are using. |
Campaign Content
The campaign_content JSON object contains the following information:
Key | Required | Values | Description |
---|---|---|---|
content | Required | JSON Object | This object has the email object. For more information, refer to Email Details. |
locales | Optional | Array |
This field includes locale information. You can send email campaigns in multiple languages using locales. |
variation_details | Optional | JSON Object | For more information, refer to Variation Details. |
Email Details
The email JSON object contains the following information:
Key | Required | Values | Description |
---|---|---|---|
attachments | Optional | Array |
This field indicates the attachment to the email. It has the items field in the following structure: items: {} |
bcc_ids | Optional | Array |
This field indicates the email IDs to which you want to send the email in Bcc. |
cc_ids | Optional | Array |
This field indicates the email IDs to which you want to send the email in Cc. |
from_address | Required | String | This field denotes the sender's email address. |
custom_template_id | Optional | String |
This field denotes the ID of the custom template. Note:
|
custom_template_version | Optional | Integer | This field denotes the version of the custom template. |
html_content | Required | String |
This field denotes the HTML content of the email campaign. Note: This field is optional if you pass the custom_template_id. |
preview_text | Optional | String | This field denotes the preview text of the campaign. |
reply_to_address | Required | String | The field denotes the reply to the address of the campaign. |
sender_name | Required | String | This field denotes the name of the sender of the campaign. |
subject | Required | String | This field denotes the subject line of your campaign. |
Variation Details
The variation_details JSON object contains the following information:
Key | Required | Values | Description |
---|---|---|---|
distribution_type | Required | String |
This field denotes the distribution type. Supported values are:
|
manual_distribution_percentage | Optional | JSON Object | This object denotes the percentage of manual distribution. This object contains the following fields:
|
no_of_variations | Required | Number | This field denotes the number of variations of the campaign. |
sherpa_campaign_duration | Optional | Number | This field denotes the Sherpa campaign duration. |
sherpa_distribution_metric | Optional | String |
This field denotes the Sherpa distribution metric. Supported values are:
|
Scheduling Details
The scheduling_details JSON object contains the following information:
Key | Required | Values | Description |
---|---|---|---|
bts_details | Optional | JSON Object | This field contains the details about best time to send. For more information, refer to Best Time to Send (BTS) Details. |
delivery_type | Required | String | This field denotes when to deliver your campaign. |
expiry_time | Optional | String | This field denotes the expiry time of your campaign. |
periodic_details | Optional | JSON Object | This object denotes the periodic details of the campaign. For more information, refer to Periodic Details. |
start_time | Optional | String | This field denotes the start time of your campaign. |
user_timezone_details | Optional | JSON Object | This object denotes the user's time zone details. For more information, refer to User Timezone Details. |
Best Time to Send (BTS) Details
Best Time to Send (BTS) provides a prescriptive time slot to send a campaign to the user to increase the chance of interaction or user response. For more information, refer to Best time to send.
The bts_details JSON object contains the following information:
Key | Required | Values | Description |
---|---|---|---|
if_user_bts_is_not_available | Optional | String | This field denotes when to send the campaign if the user's best time is not available. |
if_user_bts_outside_time_window | Optional | String | This field denotes when to send the campaign if the user's best time is outside this time window. |
send_in_bts | Optional | Boolean | This field denotes whether to send a campaign in the best time or not. |
window_end_time | Optional | String | This field denotes the window end time. |
Periodic Details
The periodic_details JSON object contains the following information:
Key | Required | Values | Description |
---|---|---|---|
no_of_occurences | Optional | Number | This field denotes the number of occurrences of the campaign. |
repeat_frequency | Optional | Number | This field denotes the repeat frequency of the campaign. |
repeat_on_date_of_month | Optional | Array |
This field indicates the date of the month on which the campaign should be repeated. For example, to send the campaign on the 5th and the 25th of a month, pass 5 and 25. |
repeat_on_days_of_week_for_month | Optional | Array |
This field denotes which days of the week for a month the campaign should repeat. This array contains the following item fields:
|
repeat_on_days_of_week | Optional | Array |
This field denotes which days of the week the campaign repeats. For example, if you wish to send the campaign every Monday and Friday, pass these days in this field as MONDAY and FRIDAY. |
sending_frequency | Optional | String | This field denotes the frequency to send the campaign. |
User Timezone Details
The user_timezone_details JSON object contains the following information:
Key | Required | Values | Description |
---|---|---|---|
send_if_user_timezone_has_passed | Optional | Boolean | This field denotes whether to send the campaign if the user's time zone has passed. |
send_in_user_timezone | Optional | Boolean | This field denotes whether to send the campaign on a specific date and time within the time zone of the user. |
Conversion Goal Details
The conversion_goal_details JSON object contains the following information:
Key | Required | Values | Description |
---|---|---|---|
attribution_window_in_hours | Optional | Number | This field denotes the attribution window in hours. |
goals | Optional | Array | This field has the items object. For more information on its structure, refer to Items Details. |
Items Details
The items JSON object contains the following information:
Key | Required | Values | Description |
---|---|---|---|
goal_event_attribute | Optional | JSON Object | This object denotes the goal event attribute. For more information, refer to Goal Event Attributes. |
goal_event_name | Optional | String | This field denotes the goal event name. |
goal_name | Optional | String | This field denotes the goal name. |
is_primary_goal | Optional | Boolean | This field denotes whether this is a primary goal or not. |
revenue_attribute | Optional | String | This field denotes the revenue attribute. |
revenue_currency | Optional | String | This field denotes the revenue currency. |
Goal Event Attributes
The goal_event_attribute JSON object contains the following information:
Key | Required | Values | Description |
---|---|---|---|
condition | Optional | String | This field denotes the condition used while creating a goal. |
is_case_sensitive | Optional | Boolean | This field denotes whether the goal event attribute is case-sensitive or not. |
name | Optional | String | This field denotes the name of the goal event attribute. |
value | Optional | String | This field denotes the value of the goal event attribute. |
Delivery Controls
The delivery_controls JSON object contains the following information:
Key | Required | Values | Description |
---|---|---|---|
bypass_dnd | Optional | Boolean | This field denotes whether you want to bypass DND. |
campaign_throttle_rpm | Optional | Number | This field denotes the campaign throttle RPM. |
count_for_frequency_capping | Optional | Boolean | This field denotes whether you want to count the channel message sent by a particular Flow for frequency capping. |
ignore_frequency_capping | Optional | Boolean | This field denotes whether you want to ignore frequency capping or not. |
minimum_delay_between_two_notification_in_hour | Optional | Number | This field denotes the minimum delay between two notifications in an hour. |
Response
Key | Data Type | Description |
---|---|---|
campaign_id | String | This field contains the unique ID corresponding to a successful campaign creation request and needs to be stored by you. This campaign ID is used for searching a specific campaign and updating it. |
error | JSON Object |
This field contains the reason for the request's failure. Structure: "error": { "code": "<error_code>", "message": "<error_message>", "target": "<target>", "details": [ { "target": "<target>", "message": "<error_message>" } ], "request_id": "<request_id>" } } The error object contains the following fields:
|
Response Codes
Status Code | Request State | Description |
---|---|---|
201 |
Success |
This response is returned when the request is processed successfully. |
400 |
Bad Request |
This response is returned when the required parameters are missing from the request, or when the provided parameters are invalid, or when a template already exists with the same version, name, or ID. |
401 |
Authentication Failure |
This response is returned when the authorization parameters are missing in the HTTP Auth Header. |
429 |
Rate Limit Breach |
This response is returned when the number of requests per minute has exceeded the rate limit. |
500 |
Internal Server Error |
This response is returned when the system runs into an unexpected error. |
Rate Limit
You can create 5 campaigns per minute, 25 campaigns per hour, and 100 campaigns per day.
Sample cURL Request
Delivery Types
curl --location 'https://api-0X.moengage.com/core-services/v1/campaigns' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'MOE-APPKEY: {{Workspace_ID or APP_ID}}' \
--header 'Authorization: Basic {{Authorization_Key}}' \
--data-raw '{
"request_id": "dfgdbddddu123",
"channel": "EMAIL",
"campaign_delivery_type": "ONE_TIME",
"created_by": "john.doe@example.com",
"basic_details": {
"name": "Test Name 1",
"tags": [
"activation"
],
"content_type": "PROMOTIONAL",
"subscription_category" : "music",
"team" : "campaign_core"
},
"segmentation_details": {
"included_filters": {
"filter_operator": "and",
"filters": [
{
"data_type": "string",
"category": "Tracked Standard Attribute",
"name": "uid",
"value": "John_Ios",
"filter_type": "user_attributes",
"case_sensitive": false,
"operator": "is",
"negate": false
}
]
}
},
"control_group_details": {
"is_global_control_group_enabled": true,
"is_campaign_control_group_enabled": true,
"campaign_control_group_percentage": "5"
},
"utm_params": {},
"connector": {
"connector_type": "SENDGRID",
"connector_name": "default"
},
"campaign_content": {
"locales": [],
"variation_details": {},
"content": {
"email": {
"subject": "Scheduled Campaign - BT",
"preview_text": "Scheduled Campaign - BT",
"sender_name": "Scheduled Campaign - BT",
"from_address": "",
"reply_to_address": "john.doe@example.com",
"cc_ids": [],
"bcc_ids": [],
"html_content": "<!DOCTYPE html><html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"><title></title><style>\n \n body table{\n border-collapse: collapse;\n }\n\n body table td, body table th{\n border: 1px solid rgb(221, 221, 221);\n }\n\n \t\t\t</style></head><body aria-disabled=\"false\" data-gr-ext-installed=\"\" data-new-gr-c-s-check-loaded=\"14.1182.0\" data-new-gr-c-s-loaded=\"14.1182.0\" spellcheck=\"false\">\n\n<p>Test User</p></body></html>"
}
}
},
"scheduling_details": {
"delivery_type": "AT_FIXED_TIME",
"start_time": "2024-06-21T12:59:00.000Z"
},
"conversion_goal_details": {
"attribution_window_in_hours": "36",
"goals": [
{
"goal_name": "Goal 1",
"goal_event_name": "NOTIFICATION_RECEIVED_MOE",
"goal_event_attribute": {
"name": "moe_campaign_channel",
"condition": "is",
"value": "2",
"is_case_sensitive": true
},
"is_primary_goal": true,
"revenue_attribute": "moe_device_densitydpi",
"revenue_currency": "ALL"
},
{
"goal_name": "Goal 2",
"goal_event_name": "testconversions",
"goal_event_attribute": {
"name": "sdkVersion",
"condition": "is",
"value": "2.2",
"is_case_sensitive": true
},
"is_primary_goal": false
}
]
},
"delivery_controls": {
"ignore_frequency_capping": true,
"count_for_frequency_capping": true,
"minimum_delay_between_two_notification_in_hour": 2,
"bypass_dnd": false,
"campaign_throttle_rpm": 2000
}
}'
curl --location 'https://api-0X.moengage.com/core-services/v1/campaigns' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'MOE-APPKEY: {{Workspace_ID or APP_ID}}' \
--header 'Authorization: Basic {{Authorization_Key}}' \
--data-raw '{
"request_id": "dfge",
"channel": "EMAIL",
"campaign_delivery_type": "PERIODIC",
"created_by": "john.doe@example.com",
"basic_details": {
"name": "Periodic Campaign",
"tags": [
"activation"
],
"content_type": "PROMOTIONAL",
"subscription_category" : "music",
"team" : "campaign_core"
},
"segmentation_details": {
"included_filters": {
"filter_operator": "and",
"filters": [
{
"data_type": "string",
"category": "Tracked Standard Attribute",
"name": "uid",
"value": "John_Ios",
"filter_type": "user_attributes",
"case_sensitive": false,
"operator": "is",
"negate": false
}
]
}
},
"control_group_details": {
"is_global_control_group_enabled": true,
"is_campaign_control_group_enabled": true,
"campaign_control_group_percentage": "5"
},
"utm_params": {},
"connector": {
"connector_type": "SENDGRID",
"connector_name": "default"
},
"campaign_content": {
"locales": [],
"variation_details": {},
"content": {
"email": {
"subject": "Scheduled Campaign - BT",
"preview_text": "Scheduled Campaign - BT",
"sender_name": "Scheduled Campaign - BT",
"from_address": "",
"reply_to_address": "john.doe@example.com",
"cc_ids": [],
"bcc_ids": [],
"html_content": "<!DOCTYPE html><html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"><title></title><style>\n \n body table{\n border-collapse: collapse;\n }\n\n body table td, body table th{\n border: 1px solid rgb(221, 221, 221);\n }\n\n \t\t\t</style></head><body aria-disabled=\"false\" data-gr-ext-installed=\"\" data-new-gr-c-s-check-loaded=\"14.1182.0\" data-new-gr-c-s-loaded=\"14.1182.0\" spellcheck=\"false\">\n\n<p>Test User periodic campaign</p></body></html>"
}
}
},
"scheduling_details": {
"delivery_type": "AT_FIXED_TIME",
"start_time": "2024-06-20T12:50:00.000Z",
"expiry_time": "2024-06-30T13:32:00.000Z",
"periodic_details": {
"sending_frequency": "DAILY",
"repeat_frequency": 10
}
},
"delivery_controls": {
"ignore_frequency_capping": true,
"count_for_frequency_capping": true,
"minimum_delay_between_two_notification_in_hour": 2,
"bypass_dnd": false,
"campaign_throttle_rpm": 2000
}
}'
curl --location 'https://api-0X.moengage.com/core-services/v1/campaigns' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'MOE-APPKEY: {{Workspace_ID or APP_ID}}' \
--header 'Authorization: Basic {{Authorization_Key}}' \
--data-raw '{
"request_id": "varw2228",
"channel": "EMAIL",
"campaign_delivery_type": "EVENT_TRIGGERED",
"created_by": "john.doe@example.com",
"basic_details": {
"name": "Trigger based campaigns",
"team" : "campaign_core",
"tags": [
"activation",
"test1"
],
"content_type": "PROMOTIONAL",
"subscription_category" : "music"
},
"trigger_condition": {
"included_filters": {
"filter_operator": "and",
"filters": [
{
"filter_type": "actions",
"action_name": "settingsauto",
"execution": {
"count": 1,
"type": "atleast"
},
"executed": true,
"attributes": {
"filters": [
{
"data_type": "bool",
"filter_type": "action_attributes",
"name": "real_time_action",
"negate": false,
"operator": "is",
"value": true
},
{
"case_sensitive": false,
"data_type": "string",
"filter_type": "action_attributes",
"name": "geo",
"negate": false,
"operator": "is",
"value": "3"
},
{
"case_sensitive": false,
"data_type": "string",
"filter_type": "action_attributes",
"name": "appVersion",
"negate": false,
"operator": "is",
"value": "2"
}
],
"filter_operator": "and"
}
}
]
},
"trigger_delay_type": "ASAP"
},
"segmentation_details": {
"included_filters": {
"filter_operator": "and",
"filters": [
{
"data_type": "string",
"category": "Tracked Standard Attribute",
"name": "u_em",
"filter_type": "user_attributes",
"case_sensitive": false,
"operator": "exists",
"negate": false
}
]
}
},
"control_group_details": {
"is_global_control_group_enabled": false,
"is_campaign_control_group_enabled": true,
"campaign_control_group_percentage": "2"
},
"utm_params": {},
"connector": {
"connector_type": "SENDGRID",
"connector_name": "default"
},
"campaign_content": {
"locales": [],
"variation_details": {},
"content": {
"email": {
"subject": "abc",
"preview_text": "abc",
"sender_name": "abc",
"from_address": "",
"reply_to_address": "john.doe@example.com",
"cc_ids": [],
"bcc_ids": [],
"html_content": "<!DOCTYPE html><html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"><title></title><style>\n \n body table{\n border-collapse: collapse;\n }\n\n body table td, body table th{\n border: 1px solid rgb(221, 221, 221);\n }\n\n \t\t\t</style></head><body aria-disabled=\"false\" data-gr-ext-installed=\"\" data-new-gr-c-s-check-loaded=\"14.1182.0\" data-new-gr-c-s-loaded=\"14.1182.0\" spellcheck=\"false\"><p>Triggered email campaign - <a href=\"https://google.com\" rel=\"noopener noreferrer\" target=\"_blank\">Google</a></p><p>{% set var = ContentApi.tYFAUkWMX({({"params":{"q":"London,uk","appid":"e81e3dcdf2845b441d22458d2cc02bb6"},"static_params":{},"dynamic_params":{},"request_body":{}})})%}</p><p><br></p></body></html>"
}
}
},
"scheduling_details": {
"delivery_type": "AT_FIXED_TIME",
"start_time": "2024-06-27T16:45:00.000Z",
"expiry_time": "2024-06-28T13:32:00.000Z"
},
"conversion_goal_details": {
"attribution_window_in_hours": 39,
"goals": [
{
"goal_name": "Goal 1",
"goal_event_name": "NOTIFICATION_RECEIVED_MOE",
"goal_event_attribute": {
"name": "moe_campaign_channel",
"condition": "is",
"value": "2",
"is_case_sensitive": true
},
"is_primary_goal": true,
"revenue_attribute": "moe_device_densitydpi",
"revenue_currency": "ALL"
},
{
"goal_name": "Goal 2",
"goal_event_name": "testconversions",
"goal_event_attribute": {
"name": "sdkVersion",
"condition": "is",
"value": "2.2",
"is_case_sensitive": true
},
"is_primary_goal": false
},
{
"goal_name": "Goal 3",
"goal_event_name": "USER ENTERED FLOW",
"goal_event_attribute": {
"name": "user_entry_identifier",
"condition": "is",
"value": "2",
"is_case_sensitive": true
},
"is_primary_goal": false
}
]
},
"delivery_controls": {
"ignore_frequency_capping": true,
"count_for_frequency_capping": true,
"minimum_delay_between_two_notification_in_hour": 2,
"bypass_dnd": false,
"campaign_throttle_rpm": 3000
}
}'
Scheduling
The following is a sample code for a Periodic campaign with:
"scheduling_details": {
"delivery_type": "AT_FIXED_TIME",
"start_time": "2024-06-29T20:32:00.000Z",
"periodic_details": {
"sending_frequency": "MONTHLY",
"repeat_frequency": 1,
"no_of_occurences": 3,
"repeat_on_days_of_week_for_month": [
{
"week_granularity": "FIRST",
"repeat_on_days_of_week": [
"TUESDAY",
"FRIDAY"
]
},
{
"week_granularity": "THIRD",
"repeat_on_days_of_week": [
"TUESDAY",
"MONDAY"
]
},
{
"week_granularity": "SECOND",
"repeat_on_days_of_week": [
"TUESDAY",
"THURSDAY"
]
},
{
"week_granularity": "FOURTH",
"repeat_on_days_of_week": [
"TUESDAY",
"WEDNESDAY"
]
},
{
"week_granularity": "LAST",
"repeat_on_days_of_week": [
"SATURDAY",
"FRIDAY"
]
}
]
}
},
"scheduling_details": {
"delivery_type": "SEND_IN_BTS",
"start_time": "2024-06-30T13:32:00.000Z",
"periodic_details": {
"sending_frequency": "WEEKLY",
"repeat_frequency": 1,
"repeat_on_days_of_week": [
"MONDAY",
"TUESDAY"
],
},
"bts_details": {
"send_in_bts": true,
"if_user_bts_outside_time_window": "CAMPAIGN_START_END_TIME",
"if_user_bts_is_not_available": "CAMPAIGN_START_TIME",
"window_end_time": "6:43 am"
}
},
"scheduling_details": {
"delivery_type": "SEND_IN_USER_TIMEZONE",
"start_time": "2024-06-27T14:00:00.000Z",
"expiry_time": "2024-06-30T13:32:00.000Z",
"periodic_details": {
"sending_frequency": "DAILY",
"repeat_frequency": 1
},
"user_timezone_details": {
"send_if_user_timezone_has_passed": true,
"send_in_user_timezone": true
}
},
Locale and Variation
The following is a sample code for a Periodic campaign with three locales and three variations:
curl --location 'https://api-0X.moengage.com/core-services/v1/campaigns' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'MOE-APPKEY: {{Workspace_ID or APP_ID}}' \
--header 'Authorization: Basic {{Authorization_Key}}' \
--data-raw '{
"request_id": "111111241",
"channel": "EMAIL",
"campaign_delivery_type": "PERIODIC",
"created_by": "john.doe@example.com",
"basic_details": {
"name": "happy flow campaigns api",
"tags": [
"activation"
],
"content_type": "PROMOTIONAL",
"team" : "campaign_core",
"subscription_category" : "music"
},
"segmentation_details": {
"included_filters": {
"filter_operator": "and",
"filters": [
{
"data_type": "string",
"category": "Tracked Standard Attribute",
"name": "u_em",
"filter_type": "user_attributes",
"case_sensitive": false,
"operator": "exists",
"negate": false
}
]
}
},
"control_group_details": {
"is_global_control_group_enabled": false,
"is_campaign_control_group_enabled": false
},
"utm_params": {},
"connector": {
"connector_type": "SENDGRID",
"connector_name": "default"
},
"campaign_content": {
"locales": [
"karnataka",
"SampleTest",
"default"
],
"variation_details": {
"distribution_type": "MANUAL",
"no_of_variations": 3,
"manual_distribution_percentage": {
"variation_1": "40",
"variation_2": "50",
"variation_3": "10"
}
},
"content": {
"karnataka": {
"variation_1": {
"email": {
"subject": "abca locale var1 karnataka",
"preview_text": "abc",
"sender_name": "abc",
"from_address": "john.doe@example.com",
"reply_to_address": "john.doe@example.com",
"cc_ids": [],
"bcc_ids": [],
"html_content": "<!DOCTYPEhtml><html><head><metahttp-equiv=\"Content-Type\"content=\"text/html; charset=UTF-8\"><title></title><style>bodytable{border-collapse:collapse;}bodytabletd,bodytableth{border:1pxsolidrgb(221,221,221);}</style></head><bodyaria-disabled=\"false\"><p><spanclass=\"fr-marker\"data-id=\"0\"data-type=\"true\"style=\"display: none; line-height: 0;\"></span>hey</p><p>Userattribute- {{UserAttribute['\''First Seen'\'']}} {{UserAttribute['\''product_id'\'']}}</p><p>Eventattribute-no</p><p>Contentblock- {{ContentBlock['\''test'\'']}}{{ContentBlock['\''22Duplicate_Wilber_Plain_text_06_07_2023_83596'\'']}}</p><p>Auxdatamapping-{%set Core_devTest_fileData=UserAttribute['\''uid'\'']|getAuxData('\''Core_devTest_file'\'')%} {{Core_devTest_fileData.random_data}}</p><p>Contentapi- {%set var=ContentApi.migration_content_api({({"params":{"q":"London,uk","appid":"e81e3dcdf2845b441d22458d2cc02bb6"},"static_params":{},"dynamic_params":{},"request_body":{}})})%} {{var}} </p><p>productset-{%if ProductSet.test_migration_product_sets%}{%for product in ProductSet.test_migration_product_sets%}{%endfor%}{%else%}MOE_NOT_SEND{%endif%}<spanclass=\"fr-marker\"data-id=\"0\"data-type=\"false\"style=\"display: none; line-height: 0;\"></span></p></body></html"
}
},
"variation_2": {
"email": {
"subject": "abca locale var2 karnataka",
"preview_text": "abc",
"sender_name": "abc",
"from_address": "john.doe@example.com",
"reply_to_address": "john.doe@example.com",
"cc_ids": [],
"bcc_ids": [],
"html_content": "<!DOCTYPEhtml><html><head><metahttp-equiv=\"Content-Type\"content=\"text/html; charset=UTF-8\"><title></title><style>bodytable{border-collapse:collapse;}bodytabletd,bodytableth{border:1pxsolidrgb(221,221,221);}</style></head><bodyaria-disabled=\"false\"><p><spanclass=\"fr-marker\"data-id=\"0\"data-type=\"true\"style=\"display: none; line-height: 0;\"></span>hey</p><p>Userattribute- {{UserAttribute['\''First Seen'\'']}} {{UserAttribute['\''product_id'\'']}}</p><p>Eventattribute-no</p><p>Contentblock- {{ContentBlock['\''test'\'']}}{{ContentBlock['\''22Duplicate_Wilber_Plain_text_06_07_2023_83596'\'']}}</p><p>Auxdatamapping-{%set Core_devTest_fileData=UserAttribute['\''uid'\'']|getAuxData('\''Core_devTest_file'\'')%} {{Core_devTest_fileData.random_data}}</p><p>Contentapi- {%set var=ContentApi.migration_content_api({({"params":{"q":"London,uk","appid":"e81e3dcdf2845b441d22458d2cc02bb6"},"static_params":{},"dynamic_params":{},"request_body":{}})})%} {{var}} </p><p>productset-{%if ProductSet.test_migration_product_sets%}{%for product in ProductSet.test_migration_product_sets%}{%endfor%}{%else%}MOE_NOT_SEND{%endif%}<spanclass=\"fr-marker\"data-id=\"0\"data-type=\"false\"style=\"display: none; line-height: 0;\"></span></p></body></html>"
}
},
"variation_3": {
"email": {
"subject": "abca locale var3 karnataka",
"preview_text": "abc",
"sender_name": "abc",
"from_address": "john.doe@example.com",
"reply_to_address": "john.doe@example.com",
"cc_ids": [],
"bcc_ids": [],
"html_content": "<!DOCTYPEhtml><html><head><metahttp-equiv=\"Content-Type\"content=\"text/html; charset=UTF-8\"><title></title><style>bodytable{border-collapse:collapse;}bodytabletd,bodytableth{border:1pxsolidrgb(221,221,221);}</style></head><bodyaria-disabled=\"false\"><p><spanclass=\"fr-marker\"data-id=\"0\"data-type=\"true\"style=\"display: none; line-height: 0;\"></span>hey</p><p>Userattribute- {{UserAttribute['\''First Seen'\'']}} {{UserAttribute['\''product_id'\'']}}</p><p>Eventattribute-no</p><p>Contentblock- {{ContentBlock['\''test'\'']}}{{ContentBlock['\''22Duplicate_Wilber_Plain_text_06_07_2023_83596'\'']}}</p><p>Auxdatamapping-{%set Core_devTest_fileData=UserAttribute['\''uid'\'']|getAuxData('\''Core_devTest_file'\'')%} {{Core_devTest_fileData.random_data}}</p><p>Contentapi- {%set var=ContentApi.migration_content_api({({"params":{"q":"London,uk","appid":"e81e3dcdf2845b441d22458d2cc02bb6"},"static_params":{},"dynamic_params":{},"request_body":{}})})%} {{var}} </p><p>productset-{%if ProductSet.test_migration_product_sets%}{%for product in ProductSet.test_migration_product_sets%}{%endfor%}{%else%}MOE_NOT_SEND{%endif%}<spanclass=\"fr-marker\"data-id=\"0\"data-type=\"false\"style=\"display: none; line-height: 0;\"></span></p></body></html>"
}
}
},
"SampleTest": {
"variation_1": {
"email": {
"subject": "abca locale var1 SampleTest",
"preview_text": "abc",
"sender_name": "abc",
"from_address": "john.doe@example.com",
"reply_to_address": "john.doe@example.com",
"cc_ids": [],
"bcc_ids": [],
"html_content": "<!DOCTYPEhtml><html><head><metahttp-equiv=\"Content-Type\"content=\"text/html; charset=UTF-8\"><title></title><style>bodytable{border-collapse:collapse;}bodytabletd,bodytableth{border:1pxsolidrgb(221,221,221);}</style></head><bodyaria-disabled=\"false\"><p><spanclass=\"fr-marker\"data-id=\"0\"data-type=\"true\"style=\"display: none; line-height: 0;\"></span>hey</p><p>Userattribute- {{UserAttribute['\''First Seen'\'']}} {{UserAttribute['\''product_id'\'']}}</p><p>Eventattribute-no</p><p>Contentblock- {{ContentBlock['\''test'\'']}}{{ContentBlock['\''22Duplicate_Wilber_Plain_text_06_07_2023_83596'\'']}}</p><p>Auxdatamapping-{%set Core_devTest_fileData=UserAttribute['\''uid'\'']|getAuxData('\''Core_devTest_file'\'')%} {{Core_devTest_fileData.random_data}}</p><p>Contentapi- {%set var=ContentApi.migration_content_api({({"params":{"q":"London,uk","appid":"e81e3dcdf2845b441d22458d2cc02bb6"},"static_params":{},"dynamic_params":{},"request_body":{}})})%} {{var}} </p><p>productset-{%if ProductSet.test_migration_product_sets%}{%for product in ProductSet.test_migration_product_sets%}{%endfor%}{%else%}MOE_NOT_SEND{%endif%}<spanclass=\"fr-marker\"data-id=\"0\"data-type=\"false\"style=\"display: none; line-height: 0;\"></span></p></body></html>"
}
},
"variation_2": {
"email": {
"subject": "abca locale var2 SampleTest",
"preview_text": "abc",
"sender_name": "abc",
"from_address": "john.doe@example.com",
"reply_to_address": "john.doe@example.com",
"cc_ids": [],
"bcc_ids": [],
"html_content": "<!DOCTYPEhtml><html><head><metahttp-equiv=\"Content-Type\"content=\"text/html; charset=UTF-8\"><title></title><style>bodytable{border-collapse:collapse;}bodytabletd,bodytableth{border:1pxsolidrgb(221,221,221);}</style></head><bodyaria-disabled=\"false\"><p><spanclass=\"fr-marker\"data-id=\"0\"data-type=\"true\"style=\"display: none; line-height: 0;\"></span>hey</p><p>Userattribute- {{UserAttribute['\''First Seen'\'']}} {{UserAttribute['\''product_id'\'']}}</p><p>Eventattribute-no</p><p>Contentblock- {{ContentBlock['\''test'\'']}}{{ContentBlock['\''22Duplicate_Wilber_Plain_text_06_07_2023_83596'\'']}}</p><p>Auxdatamapping-{%set Core_devTest_fileData=UserAttribute['\''uid'\'']|getAuxData('\''Core_devTest_file'\'')%} {{Core_devTest_fileData.random_data}}</p><p>Contentapi- {%set var=ContentApi.migration_content_api({({"params":{"q":"London,uk","appid":"e81e3dcdf2845b441d22458d2cc02bb6"},"static_params":{},"dynamic_params":{},"request_body":{}})})%} {{var}} </p><p>productset-{%if ProductSet.test_migration_product_sets%}{%for product in ProductSet.test_migration_product_sets%}{%endfor%}{%else%}MOE_NOT_SEND{%endif%}<spanclass=\"fr-marker\"data-id=\"0\"data-type=\"false\"style=\"display: none; line-height: 0;\"></span></p></body></html>"
}
},
"variation_3": {
"email": {
"subject": "abca locale var3 SampleTest",
"preview_text": "abc",
"sender_name": "abc",
"from_address": "john.doe@example.com",
"reply_to_address": "john.doe@example.com",
"cc_ids": [],
"bcc_ids": [],
"html_content": "<!DOCTYPEhtml><html><head><metahttp-equiv=\"Content-Type\"content=\"text/html; charset=UTF-8\"><title></title><style>bodytable{border-collapse:collapse;}bodytabletd,bodytableth{border:1pxsolidrgb(221,221,221);}</style></head><bodyaria-disabled=\"false\"><p><spanclass=\"fr-marker\"data-id=\"0\"data-type=\"true\"style=\"display: none; line-height: 0;\"></span>hey</p><p>Userattribute- {{UserAttribute['\''First Seen'\'']}} {{UserAttribute['\''product_id'\'']}}</p><p>Eventattribute-no</p><p>Contentblock- {{ContentBlock['\''test'\'']}}{{ContentBlock['\''22Duplicate_Wilber_Plain_text_06_07_2023_83596'\'']}}</p><p>Auxdatamapping-{%set Core_devTest_fileData=UserAttribute['\''uid'\'']|getAuxData('\''Core_devTest_file'\'')%} {{Core_devTest_fileData.random_data}}</p><p>Contentapi- {%set var=ContentApi.migration_content_api({({"params":{"q":"London,uk","appid":"e81e3dcdf2845b441d22458d2cc02bb6"},"static_params":{},"dynamic_params":{},"request_body":{}})})%} {{var}} </p><p>productset-{%if ProductSet.test_migration_product_sets%}{%for product in ProductSet.test_migration_product_sets%}{%endfor%}{%else%}MOE_NOT_SEND{%endif%}<spanclass=\"fr-marker\"data-id=\"0\"data-type=\"false\"style=\"display: none; line-height: 0;\"></span></p></body></html>"
}
}
},
"default": {
"variation_1": {
"email": {
"subject": "abca locale var1",
"preview_text": "abc",
"sender_name": "abc",
"from_address": "john.doe@example.com",
"reply_to_address": "john.doe@example.com",
"cc_ids": [],
"bcc_ids": [],
"html_content": "<!DOCTYPEhtml><html><head><metahttp-equiv=\"Content-Type\"content=\"text/html; charset=UTF-8\"><title></title><style>bodytable{border-collapse:collapse;}bodytabletd,bodytableth{border:1pxsolidrgb(221,221,221);}</style></head><bodyaria-disabled=\"false\"><p><spanclass=\"fr-marker\"data-id=\"0\"data-type=\"true\"style=\"display: none; line-height: 0;\"></span>hey</p><p>Userattribute- {{UserAttribute['\''First Seen'\'']}} {{UserAttribute['\''product_id'\'']}}</p><p>Eventattribute-no</p><p>Contentblock- {{ContentBlock['\''test'\'']}}{{ContentBlock['\''22Duplicate_Wilber_Plain_text_06_07_2023_83596'\'']}}</p><p>Auxdatamapping-{%set Core_devTest_fileData=UserAttribute['\''uid'\'']|getAuxData('\''Core_devTest_file'\'')%} {{Core_devTest_fileData.random_data}}</p><p>Contentapi- {%set var=ContentApi.migration_content_api({({"params":{"q":"London,uk","appid":"e81e3dcdf2845b441d22458d2cc02bb6"},"static_params":{},"dynamic_params":{},"request_body":{}})})%} {{var}} </p><p>productset-{%if ProductSet.test_migration_product_sets%}{%for product in ProductSet.test_migration_product_sets%}{%endfor%}{%else%}MOE_NOT_SEND{%endif%}<spanclass=\"fr-marker\"data-id=\"0\"data-type=\"false\"style=\"display: none; line-height: 0;\"></span></p></body></html>"
}
},
"variation_2": {
"email": {
"subject": "abca locale var2",
"preview_text": "abc",
"sender_name": "abc",
"from_address": "john.doe@example.com",
"reply_to_address": "john.doe@example.com",
"cc_ids": [],
"bcc_ids": [],
"html_content": "<!DOCTYPEhtml><html><head><metahttp-equiv=\"Content-Type\"content=\"text/html; charset=UTF-8\"><title></title><style>bodytable{border-collapse:collapse;}bodytabletd,bodytableth{border:1pxsolidrgb(221,221,221);}</style></head><bodyaria-disabled=\"false\"><p><spanclass=\"fr-marker\"data-id=\"0\"data-type=\"true\"style=\"display: none; line-height: 0;\"></span>hey</p><p>Userattribute- {{UserAttribute['\''First Seen'\'']}} {{UserAttribute['\''product_id'\'']}}</p><p>Eventattribute-no</p><p>Contentblock- {{ContentBlock['\''test'\'']}}{{ContentBlock['\''22Duplicate_Wilber_Plain_text_06_07_2023_83596'\'']}}</p><p>Auxdatamapping-{%set Core_devTest_fileData=UserAttribute['\''uid'\'']|getAuxData('\''Core_devTest_file'\'')%} {{Core_devTest_fileData.random_data}}</p><p>Contentapi- {%set var=ContentApi.migration_content_api({({"params":{"q":"London,uk","appid":"e81e3dcdf2845b441d22458d2cc02bb6"},"static_params":{},"dynamic_params":{},"request_body":{}})})%} {{var}} </p><p>productset-{%if ProductSet.test_migration_product_sets%}{%for product in ProductSet.test_migration_product_sets%}{%endfor%}{%else%}MOE_NOT_SEND{%endif%}<spanclass=\"fr-marker\"data-id=\"0\"data-type=\"false\"style=\"display: none; line-height: 0;\"></span></p></body></html>"
}
},
"variation_3": {
"email": {
"subject": "abca locale var3",
"preview_text": "abc",
"sender_name": "abc",
"from_address": "john.doe@example.com",
"reply_to_address": "john.doe@example.com",
"cc_ids": [],
"bcc_ids": [],
"html_content": "<!DOCTYPEhtml><html><head><metahttp-equiv=\"Content-Type\"content=\"text/html; charset=UTF-8\"><title></title><style>bodytable{border-collapse:collapse;}bodytabletd,bodytableth{border:1pxsolidrgb(221,221,221);}</style></head><bodyaria-disabled=\"false\"><p><spanclass=\"fr-marker\"data-id=\"0\"data-type=\"true\"style=\"display: none; line-height: 0;\"></span>hey</p><p>Userattribute- {{UserAttribute['\''First Seen'\'']}} {{UserAttribute['\''product_id'\'']}}</p><p>Eventattribute-no</p><p>Contentblock- {{ContentBlock['\''test'\'']}}{{ContentBlock['\''22Duplicate_Wilber_Plain_text_06_07_2023_83596'\'']}}</p><p>Auxdatamapping-{%set Core_devTest_fileData=UserAttribute['\''uid'\'']|getAuxData('\''Core_devTest_file'\'')%} {{Core_devTest_fileData.random_data}}</p><p>Contentapi- {%set var=ContentApi.migration_content_api({({"params":{"q":"London,uk","appid":"e81e3dcdf2845b441d22458d2cc02bb6"},"static_params":{},"dynamic_params":{},"request_body":{}})})%} {{var}} </p><p>productset-{%if ProductSet.test_migration_product_sets%}{%for product in ProductSet.test_migration_product_sets%}{%endfor%}{%else%}MOE_NOT_SEND{%endif%}<spanclass=\"fr-marker\"data-id=\"0\"data-type=\"false\"style=\"display: none; line-height: 0;\"></span></p></body></html>"
}
}
}
}
},
"scheduling_details": {
"delivery_type": "AT_FIXED_TIME",
"start_time": "2024-06-29T20:32:00.000Z",
"periodic_details": {
"sending_frequency": "MONTHLY",
"repeat_frequency": 1,
"no_of_occurences": 3,
"repeat_on_days_of_week_for_month": [
{
"week_granularity": "FIRST",
"repeat_on_days_of_week": [
"TUESDAY",
"FRIDAY"
]
},
{
"week_granularity": "THIRD",
"repeat_on_days_of_week": [
"TUESDAY",
"MONDAY"
]
},
{
"week_granularity": "SECOND",
"repeat_on_days_of_week": [
"TUESDAY",
"THURSDAY"
]
},
{
"week_granularity": "FOURTH",
"repeat_on_days_of_week": [
"TUESDAY",
"WEDNESDAY"
]
},
{
"week_granularity": "LAST",
"repeat_on_days_of_week": [
"SATURDAY",
"FRIDAY"
]
}
]
}
},
"conversion_goal_details": {
"attribution_window_in_hours": 39,
"goals": [
{
"goal_name": "Goal 1",
"goal_event_name": "NOTIFICATION_RECEIVED_MOE",
"goal_event_attribute": {
"name": "moe_campaign_channel",
"condition": "is",
"value": "2",
"is_case_sensitive": true
},
"is_primary_goal": true,
"revenue_attribute": "moe_device_densitydpi",
"revenue_currency": "ALL"
},
{
"goal_name": "Goal 2",
"goal_event_name": "testconversions",
"goal_event_attribute": {
"name": "sdkVersion",
"condition": "is",
"value": "2.2",
"is_case_sensitive": true
},
"is_primary_goal": false
},
{
"goal_name": "Goal 3",
"goal_event_name": "USER ENTERED FLOW",
"goal_event_attribute": {
"name": "user_entry_identifier",
"condition": "is",
"value": "2",
"is_case_sensitive": true
},
"is_primary_goal": false
}
]
},
"delivery_controls": {
"ignore_frequency_capping": true,
"count_for_frequency_capping": true,
"minimum_delay_between_two_notification_in_hour": 2,
"bypass_dnd": false,
"campaign_throttle_rpm": 3000
}
}'
Sample Response
Sample Response for a successful request
{
"campaign_id": "{Campaign_ID}"
}
{
"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": ""
}
]
}
}
Postman Collections
We have made it easy for you to test the APIs. Click here to view it in Postman.
FAQs
You can use user attributes, event attributes, product sets, content API, and content block for personalising campaigns. The syntax of the personalization Jinja is the same as supported in the MoEngage dashboard.
MoEngage dedups the campaign using the request ID. If the same request ID is passed twice in 24 hours, the second campaign creation will fail.
Campaigns are displayed under the same delivery type with which the campaigns are created through this API. For example, One-Time, Periodic, and so on.
No, only one of the two is required for creating the campaign. If both are passed, the campaign creation will display an error.