Create Campaign Draft
Creates a Push or Email campaign draft. Content, audience, and delivery settings can be included at the time of creation, or added later via PATCH /v5/campaigns/{campaign_id}.
- For the full schema of
basic_detailsandcampaign_contentper channel, platform, and template type :- Android (
BASIC/STYLIZED_BASIC/SIMPLE_IMAGE_CAROUSEL/IMAGE_BANNER_WITH_TEXT/TIMER/TIMER_WITH_PROGRESS_BAR/Custom) - iOS (
BASIC/STYLIZED_BASIC/SIMPLE_IMAGE_CAROUSEL/Custom) - Web
BASIC - Email (
html_contentandcustom_template_id), see Campaign content reference.
- Android (
- For the full schema of
trigger_condition,segmentation_details,scheduling_details,delivery_controls,conversion_goal_details,control_group_details,utm_params,campaign_audience_limit,advanced, andgeofences, see Audience and delivery reference.
Rate Limits
| Rate Limit Name | Rate Limit |
|---|---|
| Create campaign per second | The total number of create campaign operations per second per client allowed is 5. |
| Create campaign per minute | The total number of create campaign operations per minute per client allowed is 25. |
| Create campaign per hour | The total number of create campaign operations 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).
- Breaching the limits will reject the request.
- Per-hour and per-day limits use a rolling window of the last 1 hour and last 24 hours 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: On your MoEngage workspace, navigate to Settings → Account → API keys and click Create new key. The tab lists every API surface (Data, Segmentation, Push, Email, Campaigns, Templates, and more) and exposes per-resource actions. For Campaigns, ensure the View, Create & Manage, and Create, Manage & Publish checkboxes are selected.
For more information on authentication and getting your credentials, refer to Getting your credentials.
Send the value in the Authorization header as Basic followed by Base64-encoding of appkey:apisecret (workspace ID and API key).
Headers
Workspace tenant ID. Set this to the workspace (App) ID from Settings > Account > APIs > Workspace ID.
This header is optional. When omitted, the API resolves the workspace from the Basic Auth credentials in the Authorization header.
In the V1 Campaigns API, the workspace ID was passed via the MOE-APPKEY request header. In V5, this header is renamed to X-MOE-Tenant-ID.
Correlates with response_id. Supply this header or request_id in the body; if both are set, they must match.
UUID v4. Required on all POST and PATCH requests except POST /v5/campaigns/{campaign_id}/validate. Repeating the same key returns the same response body.
Body
Campaign payload. Required top-level fields are channel, campaign_delivery_type, and created_by. Optional sections (basic_details, campaign_content, audience, scheduling, and so on) can be omitted or supplied in full.
Note: Use the tabs below to select your campaign type. The schema adapts based on the selected channel.
- Push Campaign
- Email Campaign
Request body for creating a Push campaign draft via POST /v5/campaigns.
Only channel, campaign_delivery_type, and created_by are required. Optional components (basic_details, campaign_content, segmentation_details, and so on) can be included in the same request, or added later via PATCH /v5/campaigns/{campaign_id}.
For full examples per delivery type, refer to campaign_delivery_type below. For the component-level schemas with conditional rules per template type, platform, and delivery type, refer to:
- Campaign content reference —
basic_detailsandcampaign_content. - Audience and delivery reference —
trigger_condition,segmentation_details,scheduling_details,delivery_controls,conversion_goal_details,control_group_details,utm_params,campaign_audience_limit,advanced, andgeofences.
The campaign channel. One of PUSH or EMAIL.
PUSH The delivery type of the campaign.
Note: BROADCAST_LIVE_ACTIVITY is not supported through the draft-based creation flow.
For full request payloads per delivery type, see the code examples on this page.
ONE_TIME, PERIODIC, EVENT_TRIGGERED, BUSINESS_EVENT_TRIGGERED, DEVICE_TRIGGERED, LOCATION_TRIGGERED The email ID of the user creating this 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.
"{{request_id}}"
Identifying metadata for the Push campaign, including name, team, tags, and platform targeting.
For field-by-field rules, conditional requirements, and platform-specific delivery flags (Android push_amp_plus_enabled, iOS provisional-push audience flags), refer to Push campaign metadata.
Trigger condition details for Push event-triggered, device-triggered, and related campaigns.
Required for EVENT_TRIGGERED, DEVICE_TRIGGERED, and LOCATION_TRIGGERED Push campaigns.
For per-delay-type runnable payloads (ASAP, DELAY with AFTER/BEFORE, INTELLIGENT_DELAY), filter primitives, and primary/secondary filter combinations, refer to Trigger conditions.
Push message content, locales, and A/B variations.
For full POST /v5/campaigns request examples that include campaign_content, refer to campaign_delivery_type on PushCampaignCreateV5Request, VariationDetails, and the Create Campaign Draft code samples.
For per-template-type runnable payloads, refer to Android push content, iOS push content, or Web push content.
Defines the target audience for the campaign.
For included/excluded filter combinations, filter primitives (user_attributes, actions, custom_segments), and opt-out targeting, refer to Campaign audience.
Defines when the campaign should be sent.
For per-delivery-type runnable payloads (ASAP, AT_FIXED_TIME, SEND_IN_BTS, SEND_IN_USER_TIMEZONE, and PERIODIC with periodic_details), refer to Campaign delivery schedule.
Controls for Push campaign delivery behavior.
For per-delivery-type runnable examples (throttle, event-triggered, device-triggered, location-triggered, queuing), refer to Push delivery controls.
Advanced Push delivery settings, including notification expiration and per-platform priority.
For runnable iOS APNS priority and Android priority examples, refer to Advanced Push settings.
Configuration for tracking campaign conversion goals.
For runnable single-goal and multi-goal examples, refer to Conversion goal tracking.
Configuration for control groups.
For runnable campaign-control-group and global-control-group examples, refer to Control groups.
UTM parameters for tracking campaign performance. The five standard keys (utm_source, utm_medium, utm_campaign, utm_term, utm_content) are explicitly defined.
Custom UTM parameters: Up to 5 additional custom parameters can be passed as separate keys directly inside the utm_params object. Custom keys accept arbitrary names — the utm_ prefix is a convention, not a requirement (for example, utm_cust or campaign_source are both accepted).
For runnable examples, refer to UTM parameters.
Configuration for capping the number of users a campaign can reach (max-send).
For runnable TOTAL (lifetime cap), INSTANCE (per-send cap, Periodic Push only), and disabled-cap examples, refer to Campaign audience cap.
Supported channels: Email, Push.
Supported delivery types:
- All delivery types support
frequency: TOTAL(lifetime cap). frequency: INSTANCE(per-send cap) is supported only for Periodic Push campaigns.campaign_audience_limitis not supported forBROADCAST_LIVE_ACTIVITY.
Flag-gated feature: This feature is not enabled by default for any workspace and requires
explicit activation by your MoEngage account team. If you include campaign_audience_limit in
a request on a workspace where the flag has not been enabled, the API returns a 400 with the
following error body:
{
"error": {
"code": "VALIDATION_FAILED",
"message": "Campaign Audience Limit feature is not enabled for this db",
"target": "campaign_audience_limit",
"details": [
{
"target": "campaign_audience_limit",
"message": "Campaign Audience Limit feature is not enabled for this db"
}
]
},
"response_id": "{{response_id}}"
}When is_campaign_audience_limit_enabled is true, the fields metric, frequency, and
limit are all required. When set to false, those three fields must not be provided.
For ONE_TIME campaigns, only limit and is_campaign_audience_limit_enabled are supported. Do not pass metric or frequency, they are only valid for PERIODIC and EVENT_TRIGGERED campaigns.
Passing them for a ONE_TIME campaign causes the validate API to fail.