openapi: 3.2.0 info: title: Moengage Test Campaigns API version: '2025-11-20' contact: name: MoEngage Developer Team email: support@moengage.com url: https://developers.moengage.com description: 'Operations tagged Test Campaigns across 2 of this provider''s published API definitions: moengage-campaign-draft-openapi.yml, moengage-campaigns-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://api-{dc}.moengage.com/ description: MoEngage Campaigns API Server variables: dc: default: '01' description: Data center (DC) segment in the hostname. Replace `OX` with your workspace DC (01–06 or 101). See [Data centers](/api/introduction#data-centers). - url: https://api-{dc}.moengage.com/core-services/v1 description: MoEngage Campaigns API Server variables: dc: default: '01' description: The ‘dc’ in the API Endpoint URL refers to the MoEngage Data Center (DC). MoEngage hosts each customer in a different DC. You can find your DC number and replace the value of ‘dc’ in the URL by referring to the DC and API endpoint mapping [here](/api/introduction#data-centers). Your MoEngage Data Center (DC) can be 01, 02, 03, 04, 05, 06, or 101. security: - BasicAuth: [] tags: - name: Test Campaigns paths: /v5/campaigns/test: post: operationId: test_campaign_v5 summary: Test Campaign (V5) description: 'Sends a test Push or Email message to specific users or device identifiers before publishing the campaign. ' x-mint: content: 'The endpoint supports two modes: **Inline mode** - Send `channel` and `campaign_content` in the request. - For **EMAIL** campaigns, also include `basic_details` and `connector`. - Nothing is stored on the server. **Draft mode** - Send `draft_id` to load content from a saved **DRAFT**. - By default, the server sends one test per platform, locale, and variation. - To narrow the send, use `test_campaign_meta.platform`, `locale_name`, or `variation`. #### Rate Limits | Rate Limit Name | Rate Limit | | :--- | :--- | | Test campaign per second | The total number of test campaign requests per second per client allowed is 10. | | Test campaign per minute | The total number of test campaign requests per minute per client allowed is 100. | | Test campaign per hour | The total number of test campaign requests per hour per client allowed is 6000. | ' tags: - Test Campaigns parameters: - $ref: '#/components/parameters/MOE-APPKEY' - $ref: '#/components/parameters/X-MOE-Request-Id' - $ref: '#/components/parameters/Idempotency-Key-Required' requestBody: description: 'Test campaign configuration including content and target test users. **Note:** Use the tabs below to select your campaign type. The schema will adapt based on the selected channel.' required: true content: application/json: schema: $ref: '#/components/schemas/TestV5Request' examples: push_inline: summary: Push - Inline value: request_id: '{{request_id}}' channel: PUSH basic_details: name: '{{campaign_name}}' platforms: - ANDROID campaign_content: content: push: android: template_type: BASIC basic_details: title: '{{title}}' message: '{{message}}' notification_channel: '{{notification_channel}}' test_campaign_meta: identifier: USER_ATTRIBUTE_UNIQUE_ID identifier_values: - '{{identifier_value}}' email_inline: summary: Email - Inline value: request_id: '{{request_id}}' channel: EMAIL basic_details: name: '{{campaign_name}}' content_type: PROMOTIONAL user_attribute_identifier: Email (Standard) subscription_category: '{{subscription_category}}' connector: connector_type: '{{connector_type}}' connector_name: '{{connector_name}}' campaign_content: content: email: subject: '{{email_subject}}' sender_name: '{{sender_name}}' preview_text: '{{preview_text}}' from_address: '{{from_email}}' reply_to_address: '{{reply_to_address}}' html_content: '{{html_body}}' email_editor: Froala Editor test_campaign_meta: identifier: EMAIL identifier_values: - '{{recipient_email}}' push_draft: summary: Push - Draft mode value: request_id: '{{request_id}}' channel: PUSH draft_id: '{{campaign_id}}' test_campaign_meta: identifier: USER_ATTRIBUTE_UNIQUE_ID identifier_values: - '{{identifier_value}}' platform: ANDROID email_draft: summary: Email - Draft mode value: request_id: '{{request_id}}' channel: EMAIL draft_id: '{{campaign_id}}' test_campaign_meta: identifier: EMAIL identifier_values: - '{{recipient_email}}' responses: '200': description: Test send result content: application/json: schema: allOf: - $ref: '#/components/schemas/V5SuccessEnvelope' - type: object properties: data: $ref: '#/components/schemas/TestCampaignResultData' examples: push_sent: summary: Push test sent successfully value: response_id: abc-701 type: campaign data: data: ANDROID_default_variation_1: status: SENT message: Test campaign processed email_sent: summary: Email test sent successfully value: response_id: abc-702 type: campaign data: data: EMAIL_default_variation_1: status: SENT message: Test campaign processed push_failed: summary: Push test with one failed send value: response_id: abc-702 type: campaign data: data: ANDROID_default_variation_1: status: FAILED failure_reason: Invalid push token message: Test campaign processed '400': $ref: '#/components/responses/V5ValidationError' '401': $ref: '#/components/responses/V5Unauthorized' '409': description: Conflict - the `Idempotency-Key` was already used with a different request body, or a test send is already in progress for this key. Retry with a new `Idempotency-Key`. content: application/json: schema: $ref: '#/components/schemas/V5ErrorEnvelope' example: response_id: abc-701 error: code: BAD_REQUEST message: Idempotency-Key reused with a different request body. details: [] '500': $ref: '#/components/responses/V5InternalError' servers: - url: https://api-{dc}.moengage.com/ description: MoEngage Campaigns API Server variables: dc: default: '01' description: Data center (DC) segment in the hostname. Replace `OX` with your workspace DC (01–06 or 101). See [Data centers](/api/introduction#data-centers). /campaigns/test: post: operationId: test_campaign summary: Test Campaign description: 'This API sends a test Push or Email campaign to specific users or identifiers before launching it to your entire audience. You can only test campaigns created via the API, not campaigns created through the MoEngage dashboard. ' x-mint: content: "#### Rate Limits\n\n| Rate Limit Name | Rate Limit |\n| :--- | :--- |\n| Test campaign per second | The total number of test campaign requests per second per client allowed is 10. |\n| Test campaign per minute | The total number of test campaign requests per minute per client allowed is 100. |\n| Test campaign per hour | The total number of test campaign requests per hour per client allowed is 6000. | \n\n\n **Notes**\n * Breaching the limits will reject the request.\n * Per hour and per day limits will consider the calculation based on the last hour and last 24 hrs respectively.\n\n" tags: - Test Campaigns parameters: - $ref: '#/components/parameters/MOE-APPKEY_2' requestBody: description: 'Test campaign configuration including content and target test users. **Note:** Use the tabs below to select your campaign type. The schema will adapt based on the selected channel.' required: true content: application/json: schema: $ref: '#/components/schemas/CampaignTestRequest' examples: push_test_basic: summary: Push - Test with User ID value: 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 email_test_with_personalization: summary: Email - Test with Personalization value: request_id: test_email_456 channel: EMAIL basic_details: name: Newsletter Test content_type: PROMOTIONAL subscription_category: marketing user_attribute_identifier: MOE_EMAIL_ID connector: connector_type: SENDGRID connector_name: default campaign_content: content: email: subject: 'Test: Weekly Newsletter' preview_text: Testing email content sender_name: MoEngage Store from_address: noreply@example.com reply_to_address: support@example.com html_content:

Hi {{UserAttribute['First Name']}},

Testing personalized content

personalization_details: user_attributes: First Name: John Last Name: Doe event_attributes: Campaign Name: Test Campaign test_campaign_meta: identifier: EMAIL identifier_values: - john.doe@example.com - jane.smith@example.com email_test_locale_variation: summary: Email - Test with Locale & Variation value: request_id: test_email_locale channel: EMAIL basic_details: name: Multi-locale Test content_type: PROMOTIONAL subscription_category: marketing user_attribute_identifier: MOE_EMAIL_ID connector: connector_type: SENDGRID connector_name: default campaign_content: locales: - en-US - es-ES - default content: en-US: variation_1: email: subject: Test EN sender_name: Store from_address: noreply@example.com reply_to_address: support@example.com html_content: English content test_campaign_meta: identifier: ID identifier_values: - user_001 locale_name: en-US variation: variation_1 responses: '200': description: Test campaign sent successfully content: application/json: schema: $ref: '#/components/schemas/TestCampaignSuccessResponse' examples: success: summary: Successful Test value: data: user_12345: status: success message: Test campaign created successfully partial_success: summary: Partial Success value: data: john.doe@example.com: status: success jane.smith@example.com: status: failed failure_reason: User not found message: Test campaign created successfully '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '500': $ref: '#/components/responses/InternalServerError' servers: - url: https://api-{dc}.moengage.com/core-services/v1 description: MoEngage Campaigns API Server variables: dc: default: '01' description: The ‘dc’ in the API Endpoint URL refers to the MoEngage Data Center (DC). MoEngage hosts each customer in a different DC. You can find your DC number and replace the value of ‘dc’ in the URL by referring to the DC and API endpoint mapping [here](/api/introduction#data-centers). Your MoEngage Data Center (DC) can be 01, 02, 03, 04, 05, 06, or 101. /personalization/preview: post: operationId: personalized_preview summary: Personalized Preview description: "This API shows a preview of personalized content for a specific user before sending a Push, Email, or SMS campaign. This API retrieves personalized message content with all user/event attributes resolved. Use this API to validate your personalization logic and see exactly how content will appear to specific users before launching campaigns. \n" x-mint: content: ' #### Personalization Support - User attributes - Event attributes - Custom templates - Content blocks - Content APIs - Product sets #### Rate Limit The rate limit is 10,000 requests per minute. ' tags: - Test Campaigns parameters: - $ref: '#/components/parameters/MOE-APPKEY_2' - name: data-compression in: header required: false description: 'Whether to pass the payload in compressed format. Set to `true` to send compressed payload. ' schema: type: boolean example: false requestBody: description: Provide personalization preview request with content and user details. required: true content: application/json: schema: $ref: '#/components/schemas/PersonalizedPreviewRequest' examples: user_attribute_preview: summary: Preview with User Attributes value: request_id: preview_req_12345 personalization_details: channel: EMAIL user_attributes: Gender: Female First Name: Jane personalization_content: payload: email_html:

Hi {{UserAttribute['First Name']}}, your gender is {{UserAttribute['Gender']}}

user_details: identifier: ID identifier_value: USER_001 event_attribute_preview: summary: Preview with Event Attributes value: request_id: preview_req_event personalization_details: event_name: App_Opened channel: EMAIL user_attributes: First Name: John event_attributes: App_Version: 1.0.2 personalization_content: payload: message: Hi {{UserAttribute['First Name']}}, you're using version {{EventAttribute['App_Version']}} user_details: identifier: ID identifier_value: JOHN012 custom_template_preview: summary: Preview with Custom Template value: request_id: preview_req_template personalization_details: channel: PUSH user_attributes: First Name: John event_attributes: App Version: '34232' personalization_content: custom_template_data: template_id: 5b7d04c6-8ddc-4957-80d9-c67266079609 version: '1' user_details: identifier: ID identifier_value: JOHN012 content_block_preview: summary: Preview with Content Block value: request_id: preview_req_cb personalization_details: channel: SMS user_attributes: First Name: John Doe personalization_content: payload: content_block: '{{ContentBlock[''simple_text_cb'']}}' user_details: identifier: ID identifier_value: JOHN012 product_set_preview: summary: Preview with Product Set value: request_id: preview_req_products personalization_details: channel: SMS personalization_content: payload: product_set: '{% if ProductSet.test_prod%}{% for product in ProductSet.test_prod%}{{product.title}} {% endfor %}{% else %}MOE_NOT_SEND{% endif %}' user_details: identifier: ID identifier_value: JOHN012 responses: '200': description: Successfully retrieved personalized content preview content: application/json: schema: $ref: '#/components/schemas/PersonalizedPreviewResponse' examples: user_attribute_result: summary: Personalized User Attributes value: personalized_content: payload: email_html:

Hi Jane, your gender is Female

event_attribute_result: summary: Personalized Event Attributes value: personalized_content: payload: message: Hi John, you're using version 1.0.2 custom_template_result: summary: Custom Template Result value: personalized_content: payload: data: - meta_info: platform: - ANDROID template_id: '12356733' template_name: test_template channel: PUSH product_set_result: summary: Product Set Result value: personalized_content: payload: product_set: Brown Banana Chocolate Wine Honey Onion Mango Cookies Bread Toffee '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '429': $ref: '#/components/responses/RateLimitExceeded' '500': $ref: '#/components/responses/InternalServerError' servers: - url: https://api-{dc}.moengage.com/core-services/v1 description: MoEngage Campaigns API Server variables: dc: default: '01' description: The ‘dc’ in the API Endpoint URL refers to the MoEngage Data Center (DC). MoEngage hosts each customer in a different DC. You can find your DC number and replace the value of ‘dc’ in the URL by referring to the DC and API endpoint mapping [here](/api/introduction#data-centers). Your MoEngage Data Center (DC) can be 01, 02, 03, 04, 05, 06, or 101. components: schemas: EmailCampaignContent: type: object description: 'Email content, locales, and A/B variations. For full `POST /v5/campaigns` request examples that include `campaign_content`, refer to `campaign_delivery_type` on `EmailCampaignCreateV5Request`, `VariationDetails`, and the Create Campaign Draft code samples. For Email content variants, including `html_content` versus `custom_template_id`, CC/BCC, attachments, and editor selection (`Froala Editor` versus `Ace Editor`), refer to [Email content](/api/campaigns/campaign-content-reference#email-content). ' properties: locales: type: array items: type: string description: 'Additional locale names for multi-language campaigns. List only the non-default locales here (for example, `"en-US"`, `"es-ES"`). The `"default"` locale is always implicitly present and must not be included in this array. ' example: - en-US - es-ES variation_details: $ref: '#/components/schemas/VariationDetails' content: type: object description: 'The campaign message payload. Two shapes are accepted: - **Flat shape (no locales or variations):** Pass a flat `email` object directly under `content`. - **Locale-keyed and variation-keyed shape:** Key by locale name, then by variation name: `content[locale_name][variation_name] = { email: { ... } }`. The `"default"` locale key is always required and serves as the fallback. Additional locale keys must match values listed in `locales`. For runnable payloads for both shapes, refer to [Content payload structure](/api/campaigns/campaign-content-reference#content-payload-structure). ' properties: email: $ref: '#/components/schemas/EmailContent' additionalProperties: type: object description: Variation-keyed content blocks for a single locale. additionalProperties: type: object properties: email: $ref: '#/components/schemas/EmailContent' KeyValuePair: type: object description: A custom key-value pair attached to the push payload. properties: key: type: string description: The key name. value: type: string description: The value. V5SuccessEnvelope: type: object properties: response_id: type: string type: type: string example: campaign data: type: object Geofences: type: object description: 'Geofence location details for location-triggered campaigns. **Required** for LOCATION_TRIGGERED campaigns. For per-`triggered_at` runnable payloads (`ENTRY`, `EXIT`, `dwell`) and the casing distinction between `ENTRY`/`EXIT` (uppercase) and `dwell` (lowercase), refer to [Geofence targeting](/api/campaigns/audience-scheduling-delivery-reference#geofence-targeting). ' required: - name - latitude - longitude - radius - response_time_value - response_time_granularity - triggered_at properties: name: type: string description: The unique name of the geofence location being targeted. latitude: type: string description: The latitude coordinate for the center of the geofence area. longitude: type: string description: The longitude coordinate for the center of the geofence area. radius: type: string description: The radius in meters from the center point that defines the boundary of the geofence. dwell_time_value: type: string description: 'The numeric value for the time to wait before sending the message after the trigger condition is met. **Required** when triggered_at is set to "dwell". ' dwell_time_granularity: type: string enum: - MINUTES - HOURS - DAYS description: 'The time unit for the dwell_time_value. **Required** when triggered_at is set to "dwell". ' response_time_value: type: string description: The numeric value for the time to wait before sending the message after the trigger condition is met. response_time_granularity: type: string enum: - MINUTES - HOURS - DAYS description: The time unit for the response_time_value. triggered_at: type: string enum: - ENTRY - EXIT - dwell description: 'The user action that triggers the campaign (when user enters/exits the geofence). ' AndroidTimer: type: object description: 'Timer configuration for Timer and Timer with Progress Bar templates. **Required for:** TIMER and TIMER_WITH_PROGRESS_BAR templates ' properties: timer_ends_at: type: string enum: - DURATION - SPECIFIC_TIME_USER_TIMEZONE - SPECIFIC_TIME_CAMPAIGN_TIMEZONE description: How the timer's endpoint is determined. specific_time: type: string format: date-time description: 'The specific time when the timer ends. **Required** when personalized_value is true. ' time_period: type: string description: 'The time period for the timer. **Required** when timer_ends_at is SPECIFIC_TIME_USER_TIMEZONE or SPECIFIC_TIME_CAMPAIGN_TIMEZONE. ' personalized_value: type: boolean description: 'Whether the timer duration is personalized per user. If false, all users get the same duration. ' duration_hour: type: string description: 'The number of hours the timer will run for. **Required** when personalized_value is false. ' example: '2' duration_minute: type: string description: 'The number of minutes the timer will run for (in addition to hours). **Required** when personalized_value is false. ' example: '30' AndroidTemplateBackup: type: object description: 'Fallback notification content for when the template cannot be rendered. **Required for:** Stylized Basic, Simple Image Carousel, Image Banner with Text, Timer, and Timer with Progress Bar templates ' properties: title: type: string description: The title for the fallback notification. message: type: string description: The message body for the fallback notification. summary: type: string description: The summary for the fallback notification. image_url: type: string format: uri description: The URL of an image for the fallback notification. default_click_action: type: string enum: - DEEPLINKING - NAVIGATE_TO_A_SCREEN - RICH_LANDING description: The default click action for the fallback notification. default_click_action_value: type: string description: The URL or deep link for the fallback's click action. key_value_pairs: type: array items: $ref: '#/components/schemas/KeyValuePair' description: Custom key-value pairs specific to the fallback payload. PushBasicDetailsV5: type: object description: '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](/api/campaigns/campaign-content-reference#push-campaign-metadata). ' properties: name: type: string description: The name of the campaign. example: Summer Sale Push Notification business_event: type: string description: 'The business event to be mapped to the campaign. **Required** for BUSINESS_EVENT_TRIGGERED campaigns. ' example: user_signup tags: type: array items: type: string description: Tags that provide context about the campaign's nature or theme. example: - activation - summer_sale team: type: string description: 'The name of the team collaborating on this campaign. For more information, refer to [Teams in MoEngage](https://help.moengage.com/hc/en-us/articles/360028586211-Teams-in-MoEngage). ' example: marketing_team platforms: type: array items: type: string enum: - ANDROID - IOS - WEB description: The platforms to target for this Push campaign. example: - ANDROID - IOS broadcast_live_activity_id: type: string description: 'The broadcast live activity ID for iOS Live Activities. **Required** when platform is iOS and delivery_type is BROADCAST_LIVE_ACTIVITY. **Not applicable in the draft-based creation flow.** `BROADCAST_LIVE_ACTIVITY` is not supported via POST `/v5/campaigns`. ' example: live_check123 geofences: $ref: '#/components/schemas/Geofences' send_to_triggered_platform_only: type: boolean description: Whether to send the campaign only to the platform that triggered the event. Applicable for event-triggered campaigns. platform_specific_details: $ref: '#/components/schemas/PlatformSpecificDetails' TestCampaignResultData: type: object description: 'Result of a test send. `data` maps composite keys to per-send status objects. `message` summarizes the overall operation. ' properties: data: type: object description: 'Each key is a composite string in the format `{PLATFORM}_{locale}_{variation}` identifying a single test send. For example: - `ANDROID_default_variation_1` - Android platform, default locale, variation 1. - `IOS_en_control` - iOS platform, English locale, control variation. Key components: - **PLATFORM** - One of `ANDROID`, `IOS`, or `WEB`. For channels that have no platform dimension (such as Email), the channel name is used in this position instead — for example, `EMAIL_default_variation_1`. - **locale** - The locale name (for example, `en`, `fr`). Defaults to `default` if no locale is configured on the campaign. - **variation** - The variation name (for example, `variation_1`, `control`). Defaults to `variation_1` if no A/B test is configured. When you specify `platform`, `locale_name`, or `variation` in `test_campaign_meta`, only the matching key appears in the response. ' additionalProperties: type: object properties: status: type: string enum: - SENT - FAILED description: Delivery status for this platform-locale-variation combination. failure_reason: type: string description: Present only when `status` is `FAILED`. Describes why the test send failed for this combination. message: type: string description: Human-readable summary of the test send operation. example: Test campaign processed AndroidPushContent: type: object description: Android push notification content. properties: template_type: type: string enum: - BASIC - STYLIZED_BASIC - SIMPLE_IMAGE_CAROUSEL - IMAGE_BANNER_WITH_TEXT - TIMER - TIMER_WITH_PROGRESS_BAR - Custom description: 'The type of Android push template. **Note:** If you are passing a template ID, set template_type to "Custom" and use `custom_template_id`. ' custom_template_id: type: string description: 'The ID of the custom template. **Required** when template_type is "Custom". ' custom_template_version: type: integer description: The version of the custom template. basic_details: $ref: '#/components/schemas/AndroidBasicDetails' timer: $ref: '#/components/schemas/AndroidTimer' buttons: type: array items: $ref: '#/components/schemas/AndroidButton' description: Action buttons for the notification. advanced: $ref: '#/components/schemas/AndroidAdvanced' template_backup: $ref: '#/components/schemas/AndroidTemplateBackup' IOSButton: type: object description: Action button configuration for iOS push notifications. properties: button_category: type: string description: 'The pre-defined category name for a set of interactive buttons configured in the app. ' example: MOE_PUSH_TEMPLATE TestV5EmailRequest: title: Email type: object description: 'Email test request. Supports two modes: - **Inline mode**: Supply `channel`, `basic_details`, `connector`, and `campaign_content` directly. Nothing is stored on the server. - **Draft mode**: Supply `draft_id` to load content from a saved DRAFT campaign. By default, the server sends one test per locale and variation defined in the draft. Use `test_campaign_meta.locale_name` or `variation` to narrow the send. **Conditional required fields:** `test_campaign_meta` is always required. Inline mode additionally requires `channel`, `basic_details`, `connector`, and `campaign_content`. Draft mode additionally requires `draft_id`. These per-mode requirements are enforced by the API but cannot be expressed in the `required` array, which lists only the always-required `test_campaign_meta`. ' required: - test_campaign_meta properties: request_id: type: string description: Optional unique identifier for this test request (UUID v4 recommended). Used for idempotency. example: '{{request_id}}' channel: type: string enum: - EMAIL description: Required for inline mode. Must be `EMAIL`. draft_id: type: string description: Required for draft mode. Raw 24-character ObjectId of the saved DRAFT campaign to test. Obtain this value from the `id` returned when the draft was created. Mutually exclusive with `channel` and `campaign_content`. example: '{{campaign_id}}' basic_details: $ref: '#/components/schemas/EmailBasicDetailsV5' connector: $ref: '#/components/schemas/Connector' campaign_content: $ref: '#/components/schemas/EmailCampaignContent' personalization_details: $ref: '#/components/schemas/PersonalizationDetails' test_campaign_meta: $ref: '#/components/schemas/TestCampaignMetaV5' IOSAdvanced: type: object description: Platform-level advanced settings for push delivery - TTL, priority, badge count, and similar controls. properties: coupon_code: type: string description: The coupon code to be included in the push payload. sound_file: type: string description: The name of a custom sound file located in the app bundle to play upon receiving the notification. enable_ios_badge: type: boolean description: Whether this campaign allows the notification to increment the app's badge count. group_key: type: string description: 'The group key used to identify and categorize related push notifications. **Note:** - Use the same group key for all push notifications you want to group - MoEngage automatically modifies the group key to ensure it doesn''t exceed 45 characters - Non-Latin scripts, special characters, and spaces are removed ' collapse_replace_key: type: string description: 'The update key used to identify and update related push notifications. Ensure you use the same update key for all push notifications intended to update each other. ' IOSPushContent: type: object description: iOS push notification content. properties: template_type: type: string enum: - BASIC - STYLIZED_BASIC - SIMPLE_IMAGE_CAROUSEL - Custom description: 'The type of iOS push template. ' custom_template_id: type: string description: 'The ID of the custom template. **Required** when template_type is "Custom". ' custom_template_version: type: integer description: The version of the custom template. basic_details: $ref: '#/components/schemas/IOSBasicDetails' buttons: type: array items: $ref: '#/components/schemas/IOSButton' description: Action buttons for the notification. advanced: $ref: '#/components/schemas/IOSAdvanced' template_backup: $ref: '#/components/schemas/IOSTemplateBackup' WebBasicDetails: type: object description: Basic details for the Web push notification. properties: title: type: string description: The title text displayed at the top of the notification. example: Special Offer message: type: string description: The main body text of the notification. example: Check out our latest deals! redirect_url: type: string format: uri description: The URL that the user is redirected to when they click the main body of the notification. example: https://example.com/offers image_url: type: string format: uri description: The URL of a large image to be displayed within the notification content. auto_dismiss_notification: type: boolean description: Whether the notification should auto-dismiss. AndroidButton: type: object description: Action button configuration for Android push notifications. properties: btn_name: type: string description: The text to be displayed on the button. example: Shop Now click_action_type: type: string enum: - DEEPLINKING - NAVIGATE_TO_A_SCREEN - RICH_LANDING - CALL - SHARE - COPY - SET_USER_ATTRIBUTE - TRACK_EVENT - CUSTOM_ACTION - SNOOZE - REMIND_LATER description: The type of action to perform when the button is clicked. click_action_name: type: string description: The name of the click action. click_action_value: type: string description: The URL or deep link to open for the button's action. example: https://example.com/product key_value_pairs: type: array items: $ref: '#/components/schemas/KeyValuePair' description: Custom key-value pairs specific to this button's click event. Connector: type: object description: 'Email connector configuration for sending email campaigns. Required for inline Email test requests and before an Email campaign can be published or sent for testing. Not required at draft create time — it can be added later via `PATCH`. For runnable examples, refer to [Email delivery connector](/api/campaigns/campaign-content-reference#email-delivery-connector). ' required: - connector_type - connector_name properties: connector_type: type: string enum: - SENDGRID - AMAZON_SES - SPARKPOST - MANDRILL - CUSTOM_SMTP - CUSTOM_API - NETCORE description: 'The email service provider for this campaign. Must match a connector configured in your MoEngage workspace. Accepted values: `SENDGRID`, `AMAZON_SES`, `SPARKPOST`, `MANDRILL`, `CUSTOM_SMTP`, `CUSTOM_API`, `NETCORE`. To find which connectors are active, go to **Settings** > **Email** > **Connectors** in the MoEngage dashboard. ' connector_name: type: string description: The name of the connector configuration as configured in your MoEngage workspace. IOSTemplateBackup: type: object description: 'Fallback notification content for when the template cannot be rendered. **Required for:** Stylized Basic and Simple Image Carousel templates ' properties: title: type: string description: The title for the fallback notification. message: type: string description: The message body for the fallback notification. subtitle: type: string description: The subtitle for the fallback notification. allow_bg_refresh: type: boolean description: Whether to enable background app refresh for the fallback notification. rich_media_type: type: string enum: - Image - Video - GIF description: The type of media attachment for the fallback. rich_media_value: type: string format: uri description: The URL of the media attachment for the fallback. default_click_action: type: string enum: - DEEPLINKING - NAVIGATE_TO_A_SCREEN - RICH_LANDING description: The default click action for the fallback notification. default_click_action_value: type: string description: The URL or deep link for the fallback's click action. key_value_pairs: type: array items: $ref: '#/components/schemas/KeyValuePair' description: Custom key-value pairs specific to the fallback payload. V5ErrorEnvelope: type: object properties: response_id: type: string error: type: object properties: code: type: string enum: - VALIDATION_FAILED - UNPROCESSABLE_ENTITY - BAD_REQUEST - RATE_LIMITED - UNAUTHORIZED - INTERNAL_ERROR - FORBIDDEN message: type: string target: type: string details: type: array items: type: object properties: target: type: string message: type: string request_id: type: string description: 'The `request_id` from the originating request. Use this to correlate a failed response back to the specific call that triggered it, particularly useful in high-volume or retry scenarios. In V1, `request_id` appeared inside the `error` object. V5 preserves this field in the same location. ' WebAdvanced: type: object description: 'Platform-level advanced settings for push delivery - TTL, priority, badge count, and similar controls. ' properties: icon_image_type: type: string enum: - DEFAULT - ICON_URL description: The type of icon to use for the notification. icon_url: type: string format: uri description: The URL for a custom notification icon. WebPushContent: type: object description: Web push notification content. properties: template_type: type: string enum: - BASIC description: The template type for web push (currently only BASIC is supported). basic_details: $ref: '#/components/schemas/WebBasicDetails' buttons: type: array items: $ref: '#/components/schemas/WebButton' description: 'Action buttons for the notification. ' advanced: $ref: '#/components/schemas/WebAdvanced' TestV5PushRequest: title: Push type: object description: 'Push test request. Supports two modes: - **Inline mode**: Supply `channel` and `campaign_content` directly. Nothing is stored on the server. - **Draft mode**: Supply `draft_id` to load content from a saved DRAFT campaign. By default, the server sends one test per platform, locale, and variation defined in the draft. Use `test_campaign_meta.platform`, `locale_name`, or `variation` to narrow the send. **Conditional required fields:** `test_campaign_meta` is always required. Inline mode additionally requires `channel` and `campaign_content`. Draft mode additionally requires `draft_id`. These per-mode requirements are enforced by the API but cannot be expressed in the `required` array, which lists only the always-required `test_campaign_meta`. ' required: - test_campaign_meta properties: request_id: type: string description: Optional unique identifier for this test request (UUID v4 recommended). Used for idempotency. example: '{{request_id}}' channel: type: string enum: - PUSH description: Required for inline mode. Must be `PUSH`. draft_id: type: string description: Required for draft mode. Raw 24-character ObjectId of the saved DRAFT campaign to test. Obtain this value from the `id` returned when the draft was created. Mutually exclusive with `channel` and `campaign_content`. example: '{{campaign_id}}' basic_details: $ref: '#/components/schemas/PushBasicDetailsV5' campaign_content: $ref: '#/components/schemas/PushCampaignContent' personalization_details: $ref: '#/components/schemas/PersonalizationDetails' test_campaign_meta: $ref: '#/components/schemas/TestCampaignMetaV5' CarouselContent: type: object description: 'Configuration for image carousel in Simple Image Carousel template. **Required for:** Simple Image Carousel template ' properties: slider_transition: type: string enum: - MANUAL - AUTOMATIC description: 'The transition type for the carousel slides. In earlier versions of this API, the accepted values were `manual` and `automatic` (lowercase). They are now `MANUAL` and `AUTOMATIC` (uppercase). Update any existing integrations that pass lowercase values. ' slide_data: type: array description: Array of slide configurations. items: type: object properties: image_url: type: string format: uri description: The image URL for this slide. image_click_action: type: string enum: - DEEPLINKING - RICH_LANDING - NAVIGATE_TO_A_SCREEN description: The click action for this slide's image. image_click_action_value: type: string description: 'The click action value for this slide''s image. **Required** when image_click_action is provided. ' key_value_pairs: type: array items: $ref: '#/components/schemas/KeyValuePair' IOSBasicDetails: type: object description: Basic details for the iOS push notification. properties: background_color_code: type: string description: 'The hexadecimal color code for the notification''s background. **Supported Templates:** Simple Image Carousel, Stylized Basic ' example: '#a0a0a0' apply_background_color_in_text_editor: type: boolean description: 'Whether to apply the background color within the text editor view. **Supported Templates:** Simple Image Carousel, Stylized Basic ' title: type: string description: The main title of the push notification. example: New Message message: type: string description: The main body text of the notification. example: You have a new message waiting for you subtitle: type: string description: The subtitle displayed below the main title. allow_bg_refresh: type: boolean description: Whether to allow the app to be woken up in the background to refresh content. rich_media_type: type: string enum: - Image - Video - GIF description: 'The type of rich media to be included in the notification. **Supported Templates:** Basic ' rich_media_value: type: string format: uri description: 'The URL of the rich media asset specified in the rich_media_type field. **Supported Templates:** Basic ' image_url: type: string format: uri description: 'The URL of a large image to be displayed within the notification content. **Note:** Required when template_type is SIMPLE_IMAGE_CAROUSEL. ' input_gif_url: type: string format: uri description: 'The URL for the GIF media used in the push campaign content. **Supported Templates:** Basic, Stylized Basic ' carousel_content: $ref: '#/components/schemas/IOSCarouselContent' default_click_action: type: string enum: - DEEPLINKING - NAVIGATE_TO_A_SCREEN - RICH_LANDING description: The action performed when the main body of the notification is tapped. default_click_action_value: type: string description: The URL or deep link associated with the default click action. key_value_pairs: type: array items: $ref: '#/components/schemas/KeyValuePair' description: Custom key-value pairs sent with the push payload for in-app handling. EmailBasicDetailsV5: type: object description: 'Identifying metadata for the Email campaign, including name, team, tags, and subscription category. **Conditional requirements:** `name`, `content_type`, `user_attribute_identifier`, and `subscription_category` are strictly required only when using the `/v5/campaigns/test` endpoint in **inline mode**. They are not required at campaign creation time (V5 supports progressive creation, where components are added later via PATCH) and are not needed in **draft mode** tests, where content comes from the saved draft. ' properties: name: type: string description: Any string name for the test or campaign. example: Summer Sale Email business_event: type: string description: The business event to be mapped to the campaign. example: user_signup content_type: type: string enum: - PROMOTIONAL - TRANSACTIONAL description: The type of content in the campaign. "PROMOTIONAL" or "TRANSACTIONAL". subscription_category: type: string description: 'The subscription category for promotional email campaigns. **Must match a valid category configured in your workspace.** **Required** for PROMOTIONAL email campaigns and inline tests. ' example: marketing tags: type: array items: type: string description: Tags that provide context about the campaign's nature or theme. example: - activation - summer_sale team: type: string description: The name of the team collaborating on this campaign. example: marketing_team user_attribute_identifier: type: string default: Email (Standard) description: 'The user attribute that stores the recipient email address. Use "Email (Standard)" for email channels. ' example: Email (Standard) VariationDetails: type: object description: 'Configuration for A/B testing variations. For runnable `MANUAL` (fixed split) and `SHERPA` (auto-optimized) examples, refer to [A/B test variations](/api/campaigns/campaign-content-reference#a-b-test-variations). ' properties: distribution_type: type: string enum: - SHERPA - MANUAL description: 'The traffic distribution method for A/B test variations. - `MANUAL` - you specify a fixed percentage split across variations. - `SHERPA` - MoEngage''s AI-powered optimizer automatically shifts traffic toward the best-performing variation during the campaign run. ' no_of_variations: type: integer minimum: 1 description: The number of A/B test variations. example: 2 manual_distribution_percentage: type: object additionalProperties: type: integer description: "Fixed percentage of audience assigned to each variation. \n**Note:** Variation keys must follow the `variation_N` naming format (e.g. `variation_1`, `variation_2`). Keys with any other format like `var_1`, `1`, `2` will be rejected with a validation error.\n\n**Required** when `distribution_type` is `MANUAL`.\n" example: variation_1: 50 variation_2: 50 sherpa_campaign_duration: type: integer description: 'Duration in hours over which MoEngage Sherpa collects performance data before declaring a winning variation. **Required** when `distribution_type` is `SHERPA`. ' sherpa_distribution_metric: type: string enum: - OPEN_RATE - CLICK_RATE - BOTH description: 'The engagement metric Sherpa uses to evaluate and rank variations. **Required** when `distribution_type` is `SHERPA`. ' PushCampaignContent: type: object description: '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](/api/campaigns/campaign-content-reference#android-push-content), [iOS push content](/api/campaigns/campaign-content-reference#ios-push-content), or [Web push content](/api/campaigns/campaign-content-reference#web-push-content). ' properties: locales: type: array items: type: string description: 'Additional locale names for multi-language campaigns. List only the non-default locales here (for example, `"en-US"`, `"es-ES"`). The `"default"` locale is always implicitly present and must not be included in this array. ' example: - en-US - es-ES variation_details: $ref: '#/components/schemas/VariationDetails' content: type: object description: 'The campaign message payload. Two shapes are accepted: - **Flat shape (no locales or variations):** Pass a flat `push` object directly under `content`. - **Locale-keyed and variation-keyed shape:** Key by locale name, then by variation name: `content[locale_name][variation_name] = { push: { ... } }`. The `"default"` locale key is always required and serves as the fallback. Additional locale keys must match values listed in `locales`. If your V1 integration used locale-variation wrapping, you must continue using that structure in V5. The flat format is only valid when no locales or A/B variations are configured on the campaign. For runnable payloads for both shapes, refer to [Content payload structure](/api/campaigns/campaign-content-reference#content-payload-structure). ' properties: push: $ref: '#/components/schemas/PushContent' additionalProperties: type: object description: Variation-keyed content blocks for a single locale. additionalProperties: type: object properties: push: $ref: '#/components/schemas/PushContent' AndroidBasicDetails: type: object description: "Basic details for the Android push notification. \n\nFields vary by template_type. All templates support common fields like title, message, default_click_action.\n" properties: notification_channel: type: string description: The Android notification channel where the push will be sent. example: general include_app_name_and_time: type: boolean description: 'Whether to include the application''s name and timestamp within the banner image. **Supported Templates:** Image Banner with Text ' background_color_code: type: string description: 'The hex code for the notification''s background color. **Supported Templates:** Stylized Basic, Simple Image Carousel, Image Banner with Text ' example: '#9a4444' app_name_color_code: type: string description: 'The hex code for the color of the application''s name text. **Supported Templates:** Stylized Basic, Simple Image Carousel, Image Banner with Text ' example: '#dea1a1' notification_control_color: type: string enum: - LIGHT - DARK description: 'The color scheme for the notification''s control elements (action buttons). **Supported Templates:** Stylized Basic, Simple Image Carousel, Image Banner with Text ' include_title_and_message: type: boolean description: 'Whether to include the notification''s title and message text within the banner image. **Supported Templates:** Image Banner with Text ' apply_background_color_in_text_editor: type: boolean description: 'Whether to apply the specified background color within the rich text editor for preview. **Supported Templates:** Stylized Basic, Simple Image Carousel, Image Banner with Text ' title: type: string description: The main title of the push notification. example: Limited Time Offer! message: type: string description: 'The message body of the push notification. You can use HTML in the message parameter to apply rich text formatting, including text color and styles. ' example: Get 50% off on all items. Shop now! summary: type: string description: The summary text for the notification. image_url: type: string format: uri description: The image URL for the push notification. example: https://example.com/images/promo.jpg image_scaling: type: string enum: - FIT_INSIDE_IMAGE_CONTAINER - FILL_IMAGE_CONTAINER description: 'The scaling behavior for images within the carousel template. **Supported Templates:** Simple Image Carousel, Image Banner with Text ' banner_image_url: type: string format: uri description: 'The URL for the background image used in the Image Banner Text template. **Required for:** Image Banner with Text template ' input_gif_url: type: string format: uri description: 'The URL for the GIF media used in the push campaign content. **Supported Templates:** Basic ' collapsed_push_notification: type: string description: 'The configuration for the notification''s collapsed state (view before user expands it). **Supported Templates:** Image Banner with Text ' example: SAME_AS_TEMPLATE_BACKUP carousel_content: $ref: '#/components/schemas/CarouselContent' default_click_action: type: string enum: - DEEPLINKING - NAVIGATE_TO_A_SCREEN - RICH_LANDING description: The action performed when the main body of the notification is clicked. default_click_action_value: type: string description: The URL or deep link to open when the notification is clicked. example: https://example.com/sale key_value_pairs: type: array items: $ref: '#/components/schemas/KeyValuePair' description: Custom key-value pairs for the notification payload. PlatformSpecificDetails: type: object description: 'Platform-specific configuration details for Push. For runnable Android and iOS examples and the mutual-exclusion rule on iOS audience flags, refer to [Platform-specific delivery flags](/api/campaigns/campaign-content-reference#platform-specific-delivery-flags). ' properties: android: type: object properties: push_amp_plus_enabled: type: boolean default: false description: Whether Push Amp+ feature is enabled for this campaign. ios: type: object description: '**Note:** You must pass one of these keys as true for iOS. ' properties: send_to_all_eligible_device: type: boolean description: Whether to send the campaign to all eligible devices. exclude_provisional_push_devices: type: boolean description: Whether to exclude provisional push devices. send_to_only_provisional_push_enabled_devices: type: boolean description: Whether to send only to provisional push-enabled devices. TestCampaignMetaV5: type: object description: Test audience and delivery options. required: - identifier - identifier_values properties: identifier: type: string enum: - USER_ATTRIBUTE_UNIQUE_ID - USER_ATTRIBUTE_USER_EMAIL - USER_ATTRIBUTE_USER_MOBILE - MOE_GAID - ADVERTISING_IDENTIFIER - PUSH_ID - CUSTOM_SEGMENT - EMAIL - ID - MOBILE_NUMBER description: "The type of identifier used to target test recipients. Supported values vary by channel:\n\n**Push campaigns:**\n- `USER_ATTRIBUTE_UNIQUE_ID` - Permanent internal user ID (for example, `USER_1138`).\n- `USER_ATTRIBUTE_USER_EMAIL` - User's email address (for example, `jane@example.com`).\n- `USER_ATTRIBUTE_USER_MOBILE` - User's mobile number in E.164 format (for example, `+14155550101`).\n- `MOE_GAID` - Google Advertising ID (Android devices).\n- `ADVERTISING_IDENTIFIER` - Resettable advertising ID (GAID on Android, IDFA on iOS).\n- `PUSH_ID` - Unique device push token.\n- `CUSTOM_SEGMENT` - User-defined segment.\n\n**Email campaigns:**\n- `EMAIL` - Email address. Content will not be personalised with user profile data if no matching record exists in MoEngage.\n- `ID` - MoEngage internal user ID.\n- `MOBILE_NUMBER` - User's mobile number in E.164 format.\n- `CUSTOM_SEGMENT` - User-defined segment.\n\n
\nUSER_ATTRIBUTE_UNIQUE_ID\n\n```json\n{\n \"draft_id\": \"{{campaign_id}}\",\n \"test_campaign_meta\": {\n \"identifier\": \"USER_ATTRIBUTE_UNIQUE_ID\",\n \"identifier_values\": [\n \"{{user_unique_id}}\"\n ]\n }\n}\n```\n\n
\n
\nEMAIL\n\n```json\n{\n \"draft_id\": \"{{campaign_id}}\",\n \"test_campaign_meta\": {\n \"identifier\": \"EMAIL\",\n \"identifier_values\": [\n \"{{recipient_email}}\"\n ]\n }\n}\n```\n\n
\n
\nMOE_GAID (Android)\n\n```json\n{\n \"draft_id\": \"{{campaign_id}}\",\n \"test_campaign_meta\": {\n \"identifier\": \"MOE_GAID\",\n \"identifier_values\": [\n \"{{moe_gaid}}\"\n ]\n }\n}\n```\n\n
\n
\nPUSH_ID\n\n```json\n{\n \"draft_id\": \"{{campaign_id}}\",\n \"test_campaign_meta\": {\n \"identifier\": \"PUSH_ID\",\n \"identifier_values\": [\n \"{{push_id}}\"\n ]\n }\n}\n```\n\n
\n
\nCUSTOM_SEGMENT\n\n```json\n{\n \"draft_id\": \"{{campaign_id}}\",\n \"test_campaign_meta\": {\n \"identifier\": \"CUSTOM_SEGMENT\",\n \"identifier_values\": [\n \"{{custom_segment_name}}\"\n ]\n }\n}\n```\n\n
\n" identifier_values: type: array items: type: string maxItems: 10 description: Array of identifier values to send the test campaign to. Maximum 10 values per request. example: - '{{identifier_value}}' variation: type: string description: "A/B variation name to target for this test send (for example, `variation_1`, `control`).\nIf omitted, the server sends one test per variation defined in the draft.\n\n
\nTarget a single A/B variation\n\n```json\n{\n \"draft_id\": \"{{campaign_id}}\",\n \"test_campaign_meta\": {\n \"identifier\": \"USER_ATTRIBUTE_UNIQUE_ID\",\n \"identifier_values\": [\n \"{{user_unique_id}}\"\n ],\n \"variation\": \"variation_2\"\n }\n}\n```\n\n
\n" example: '{{variation_name}}' locale_name: type: string description: "Locale name to target for this test send (for example, `en`, `fr`).\nIf omitted, the server sends one test per locale defined in the draft.\n\n
\nTarget a single locale\n\n```json\n{\n \"draft_id\": \"{{campaign_id}}\",\n \"test_campaign_meta\": {\n \"identifier\": \"USER_ATTRIBUTE_UNIQUE_ID\",\n \"identifier_values\": [\n \"{{user_unique_id}}\"\n ],\n \"locale_name\": \"es-ES\"\n }\n}\n```\n\n
\n" example: '{{locale_name}}' platform: type: string enum: - ANDROID - IOS - WEB description: "Optional. Applies to draft mode only. Narrows the test send to a single platform.\nIf omitted, the server sends one test per platform defined in the draft.\n\n
\nTarget a single platform (iOS only)\n\n```json\n{\n \"draft_id\": \"{{campaign_id}}\",\n \"test_campaign_meta\": {\n \"identifier\": \"USER_ATTRIBUTE_UNIQUE_ID\",\n \"identifier_values\": [\n \"{{user_unique_id}}\"\n ],\n \"platform\": \"IOS\"\n }\n}\n```\n\n
\n" EmailContent: type: object description: Email campaign content. properties: subject: type: string description: The subject line of the email. example: Exclusive Summer Sale - 50% Off! preview_text: type: string description: The preview text shown in email clients. example: Don't miss out on our biggest sale of the season sender_name: type: string description: The name of the sender that appears in the email. example: MoEngage Team from_address: type: string format: email description: The sender's email address. example: noreply@example.com reply_to_address: type: string format: email description: The reply-to email address. example: support@example.com cc_ids: type: array items: type: string format: email description: Email addresses to CC. For runnable examples, refer to [Email content variants](/api/campaigns/campaign-content-reference#email-content-variants). bcc_ids: type: array items: type: string format: email description: Email addresses to BCC. For runnable examples, refer to [Email content variants](/api/campaigns/campaign-content-reference#email-content-variants). html_content: type: string description: 'The HTML content of the email. **Optional** if custom_template_id is provided. ' example:

Hello {{UserAttribute['First Name']}}

email_editor: type: string enum: - Froala Editor - Ace Editor description: 'The HTML editor used for the email campaign. - **Required** if you want to create the campaign using the `Ace Editor`. - **Optional** if you want to use the default `Froala Editor`. ' example: Ace Editor custom_template_id: type: string description: 'The ID of a custom email template. **Optional** if html_content is provided. When this field is provided, the following fields are not required: - subject - preview_text - sender_name ' custom_template_version: type: integer description: The version of the custom template. attachments: type: array items: type: object properties: file_type: type: string enum: - URL - PERSONALIZED_ATTACHMENT url: type: string description: 'Attachments to include in the email. ' TestV5Request: oneOf: - $ref: '#/components/schemas/TestV5PushRequest' - $ref: '#/components/schemas/TestV5EmailRequest' discriminator: propertyName: channel mapping: PUSH: '#/components/schemas/TestV5PushRequest' EMAIL: '#/components/schemas/TestV5EmailRequest' PushContent: type: object description: Push notification content for Android, iOS, and Web platforms. properties: android: $ref: '#/components/schemas/AndroidPushContent' ios: $ref: '#/components/schemas/IOSPushContent' web: $ref: '#/components/schemas/WebPushContent' AndroidAdvanced: type: object description: Platform-level advanced settings for push delivery - TTL, priority, badge count, and similar controls. properties: coupon_code: type: string description: The coupon code to be included in the push payload. example: SUMMER50 icon_type_in_notification: type: string description: The icon type to be included in the push payload. example: app_icon use_large_icon: type: boolean description: Whether to use a large icon in the notification. make_notification_sticky: type: boolean description: 'When enabled, the user cannot swipe away the notification. ' dismiss_button_text: type: string description: 'The text to display on the dismiss button. **Required** when make_notification_sticky is true or auto_dismiss_notification is true. ' auto_dismiss_notification: type: boolean description: Whether the notification can be auto-dismissed. auto_dismiss_notification_time_value: type: integer description: 'The time value after which to auto-dismiss the notification. **Required** when auto_dismiss_notification is true. ' auto_dismiss_notification_time_granularity: type: string enum: - DAYS - HOURS - MINUTES description: 'The time unit for auto-dismiss. **Required** when auto_dismiss_notification is true. ' group_key: type: string description: 'The group key used to identify and categorize related push notifications. **Note:** - Use the same group key for all push notifications you want to group - MoEngage automatically modifies the group key to ensure it doesn''t exceed 45 characters - Non-Latin scripts, special characters, and spaces are removed ' collapse_replace_key: type: string description: 'The update key used to identify and update related push notifications. Ensure you use the same update key for all push notifications intended to update each other. ' IOSCarouselContent: type: object description: 'Configuration for image carousel in Simple Image Carousel template. **Required for:** Simple Image Carousel template ' properties: slider_transition: type: string enum: - MANUAL - AUTOMATIC description: 'The transition type for the carousel slides. In earlier versions of this API, the accepted values were `manual` and `automatic` (lowercase). They are now `MANUAL` and `AUTOMATIC` (uppercase). Update any existing integrations that pass lowercase values. ' slide_data: type: array description: Array of slide configurations. items: type: object properties: image_url: type: string format: uri description: The image URL for this slide. image_click_action: type: string enum: - DEEPLINKING - RICH_LANDING - NAVIGATE_TO_A_SCREEN description: The click action for this slide's image. image_click_action_value: type: string description: The click action value for this slide's image. key_value_pairs: type: array items: $ref: '#/components/schemas/KeyValuePair' WebButton: type: object description: Action button configuration for Web push notifications. properties: title: type: string description: The text displayed on the button. example: View Offer icon_url: type: string format: uri description: The URL of an icon to be displayed next to the button text. url: type: string format: uri description: The destination URL that the user is redirected to when they click this button. PersonalizationDetails: type: object description: "Overrides user and event attribute values used to render personalised content during the test send.\nWhen supplied, these values replace what would normally be fetched from the stored user profile,\nuseful for testing personalised content without needing a matching user record in MoEngage.\n\n
\nTest with personalization overrides\n\n```json\n{\n \"draft_id\": \"{{campaign_id}}\",\n \"personalization_details\": {\n \"user_attributes\": {\n \"First Name\": \"{{first_name}}\",\n \"City\": \"{{city}}\"\n },\n \"event_attributes\": {\n \"product_name\": \"{{product_name}}\",\n \"price\": 79.99\n }\n },\n \"test_campaign_meta\": {\n \"identifier\": \"USER_ATTRIBUTE_UNIQUE_ID\",\n \"identifier_values\": [\n \"{{user_unique_id}}\"\n ]\n }\n}\n```\n\n
\n" properties: user_attributes: type: object description: Key-value pairs of user attribute names and the override values to use for this test send. example: First Name: Jane City: New York event_attributes: type: object description: Key-value pairs of event attribute names and the override values to use for this test send. example: product_name: Running Shoes price: 79.99 EmailCampaignContent_2: type: object description: Contains the content and variations for the Email campaign. required: - content properties: locales: type: array items: type: string description: 'List of locales for multi-language campaigns. You can send campaigns in multiple languages using locales. ' example: - en-US - es-ES - default variation_details: $ref: '#/components/schemas/VariationDetails_2' content: type: object description: The actual Email campaign content. required: - email properties: email: $ref: '#/components/schemas/EmailContent_2' KeyValuePair_2: type: object description: A key-value pair for custom data. required: - key - value properties: key: type: string description: The key name. value: type: string description: The value. PushTestCampaignMeta: type: object description: Metadata for specifying test recipients for Push campaigns. required: - identifier - identifier_values properties: identifier: type: string enum: - USER_ATTRIBUTE_UNIQUE_ID - USER_ATTRIBUTE_USER_EMAIL - USER_ATTRIBUTE_USER_MOBILE - MOE_GAID - ADVERTISING_IDENTIFIER - PUSH_ID - CUSTOM_SEGMENT description: 'The type of identifier used to target test users. - **USER_ATTRIBUTE_UNIQUE_ID**: Permanent internal user ID (e.g., USER_1138) - **USER_ATTRIBUTE_USER_EMAIL**: User''s email address (e.g., john.doe@example.com) - **USER_ATTRIBUTE_USER_MOBILE**: User''s mobile number (e.g., +14155550101) - **MOE_GAID**: Google Advertising ID from Android device - **ADVERTISING_IDENTIFIER**: Resettable advertising ID (GAID on Android, IDFA on iOS) - **PUSH_ID**: Unique device token for push notifications - **CUSTOM_SEGMENT**: User-defined segment for targeting ' identifier_values: type: array items: type: string description: Array of identifier values to send the test campaign to. example: - user_12345 - user_67890 locale_name: type: string description: The locale name to use for the test campaign (when using multi-locale campaigns). variation: type: string description: The variation name to use for the test campaign (when using A/B testing). example: variation_1 Geofences_2: type: object description: 'Geofence location details for location-triggered campaigns. **Required** for LOCATION_TRIGGERED campaigns. ' required: - name - latitude - longitude - radius - response_time_value - response_time_granularity - triggered_at properties: name: type: string description: The unique name of the geofence location being targeted. latitude: type: string description: The latitude coordinate for the center of the geofence area. longitude: type: string description: The longitude coordinate for the center of the geofence area. radius: type: string description: The radius in meters from the center point that defines the boundary of the geofence. dwell_time_value: type: string description: 'The numeric value for the time to wait before sending the message after the trigger condition is met. **Required** when triggered_at is set to "dwell". ' dwell_time_granularity: type: string enum: - MINUTES - HOURS - DAYS description: 'The time unit for the dwell_time_value. **Required** when triggered_at is set to "dwell". ' response_time_value: type: string description: The numeric value for the time to wait before sending the message after the trigger condition is met. response_time_granularity: type: string enum: - MINUTES - HOURS - DAYS description: The time unit for the response_time_value. triggered_at: type: string enum: - ENTRY - EXIT - dwell description: The user action that triggers the campaign (when user enters/exits the geofence). AndroidTimer_2: type: object description: 'Timer configuration for Timer and Timer with Progress Bar templates. **Required for:** TIMER and TIMER_WITH_PROGRESS_BAR templates ' required: - timer_ends_at - personalized_value properties: timer_ends_at: type: string enum: - DURATION - SPECIFIC_TIME_USER_TIMEZONE - SPECIFIC_TIME_CAMPAIGN_TIMEZONE description: How the timer's endpoint is determined. specific_time: type: string format: date-time description: 'The specific time when the timer ends. **Required** when personalized_value is true. ' time_period: type: string description: 'The time period for the timer. **Required** when timer_ends_at is SPECIFIC_TIME_USER_TIMEZONE or SPECIFIC_TIME_CAMPAIGN_TIMEZONE. ' personalized_value: type: boolean description: 'Whether the timer duration is personalized per user. If false, all users get the same duration. ' duration_hour: type: string description: 'The number of hours the timer will run for. **Required** when personalized_value is false. ' example: '2' duration_minute: type: string description: 'The number of minutes the timer will run for (in addition to hours). **Required** when personalized_value is false. ' example: '30' AndroidTemplateBackup_2: type: object description: 'Fallback notification content for when the template cannot be rendered. **Required for:** Stylized Basic, Simple Image Carousel, Image Banner with Text, Timer, and Timer with Progress Bar templates ' required: - title - message - default_click_action - default_click_action_value properties: title: type: string description: The title for the fallback notification. message: type: string description: The message body for the fallback notification. summary: type: string description: The summary for the fallback notification. image_url: type: string format: uri description: The URL of an image for the fallback notification. default_click_action: type: string enum: - DEEPLINKING - NAVIGATE_TO_A_SCREEN - RICH_LANDING description: The default click action for the fallback notification. default_click_action_value: type: string description: The URL or deep link for the fallback's click action. key_value_pairs: type: array items: $ref: '#/components/schemas/KeyValuePair_2' description: Custom key-value pairs specific to the fallback payload. GmailAnnotationsProductCarouselProductSetData: type: object description: 'Product set configuration for the Gmail Annotations product carousel. Pulls products dynamically from a MoEngage Catalog product set. **Required** when `product_carousel.type` is `PRODUCT_SET`. Requires the Product Sets feature to be enabled for your workspace. ' required: - product_set - image_url - headline - promo_url - product_count properties: product_set: type: string description: 'Product set ID from MoEngage Catalog. Must be valid and exist in your workspace. **Required** when `product_set_data` is present. ' example: product_set_12345 image_url: type: string description: 'Fallback image URL if a product set image is unavailable. **Required** when `product_set_data` is present. ' example: https://example.com/images/fallback.png headline: type: string description: 'Label shown for the product carousel. **Required** when `product_set_data` is present. ' example: Recommended For You promo_url: type: string description: 'Destination URL when the user clicks the annotation. **Required** when `product_set_data` is present. ' example: https://example.com/shop product_count: type: integer description: 'Number of products to display. **Required** when `product_set_data` is present. Minimum 2, maximum 9. ' minimum: 2 maximum: 9 example: 3 GmailAnnotationsProductCarousel: type: object description: 'Product Carousel annotation shown in Gmail''s Promotions tab. Use `MANUAL` to specify products directly in the request, or `PRODUCT_SET` to pull products dynamically from a MoEngage Catalog product set. ' required: - type properties: type: type: string enum: - MANUAL - PRODUCT_SET description: 'The source type for the product carousel. - `MANUAL`: Specify products directly in the request using `manual_data`. - `PRODUCT_SET`: Pull products dynamically from a MoEngage Catalog product set using `product_set_data`. Requires the Product Sets feature to be enabled for your workspace. **Required** when `product_carousel` is present. ' manual_data: description: 'Products specified directly in the request. **Required** when `product_carousel.type` is `MANUAL`. ' allOf: - $ref: '#/components/schemas/GmailAnnotationsProductCarouselManualData' product_set_data: description: 'Reference to a MoEngage Catalog product set. **Required** when `product_carousel.type` is `PRODUCT_SET`. ' allOf: - $ref: '#/components/schemas/GmailAnnotationsProductCarouselProductSetData' UTMParams: type: object description: UTM parameters for tracking campaign performance. required: - utm_source - utm_medium properties: utm_source: type: string description: 'The source of the traffic (e.g., YouTube, Instagram, Google). **Required** when using UTM parameters. ' example: google utm_medium: type: string description: 'The channel type (e.g., Push, SMS, Email). **Required** when using UTM parameters. ' example: email utm_campaign: type: string description: The name of the campaign (e.g., Newyear, Bigbillionday). example: summer_sale utm_term: type: string description: Search terms for paid traffic (e.g., Mobile+sale). utm_content: type: string description: The content element that differentiates links (e.g., banner, video). utm_custom: type: string description: Custom UTM parameter (maximum of 5 custom parameters). GmailAnnotationsProductCarouselManualProduct: type: object description: A single product entry in a manual product carousel. All fields below are required for each product. required: - id - headline - original_price - discount_value - discount_type - promo_url - product_image properties: id: type: string description: 'Unique product identifier. **Required** for each product. ' example: prod-001 headline: type: string description: 'Product name shown in the annotation. **Required** for each product. ' example: Wireless Headphones original_price: type: string description: 'Original price of the product as a numeric string. **Required** for each product. ' example: '199.99' discount_value: type: string description: 'Discount amount as a numeric string. Interpreted as a percentage or absolute value depending on `discount_type`. **Required** for each product. ' example: '30' discount_type: type: string enum: - PERCENT - VALUE description: 'How `discount_value` is interpreted. - `PERCENT`: `discount_value` is a percentage. - `VALUE`: `discount_value` is an absolute amount in `currency`. **Required** for each product. ' example: PERCENT promo_url: type: string description: 'Product landing page URL. Must be a valid HTTPS URL. **Required** for each product. ' example: https://example.com/products/prod-001 product_image: type: string description: 'Product image URL. Must be a valid HTTPS URL. Cannot be empty. **Required** for each product. ' example: https://example.com/images/prod-001.png AndroidPushContent_2: type: object description: Android push notification content. required: - template_type properties: template_type: type: string enum: - BASIC - STYLIZED_BASIC - SIMPLE_IMAGE_CAROUSEL - IMAGE_BANNER_WITH_TEXT - TIMER - TIMER_WITH_PROGRESS_BAR - Custom description: 'The type of Android push template. **Note:** If you are passing a template ID, set template_type to "Custom". ' custom_template_id: type: string description: 'The ID of the custom template. **Required** when template_type is "Custom". ' custom_template_version: type: integer description: The version of the custom template. basic_details: $ref: '#/components/schemas/AndroidBasicDetails_2' timer: $ref: '#/components/schemas/AndroidTimer_2' buttons: type: array description: Action buttons for the notification. items: $ref: '#/components/schemas/AndroidButton_2' advanced: $ref: '#/components/schemas/AndroidAdvanced_2' template_backup: $ref: '#/components/schemas/AndroidTemplateBackup_2' IOSButton_2: type: object description: Action button configuration for iOS push notifications. required: - button_category properties: button_category: type: string description: 'The pre-defined category name for a set of interactive buttons configured in the app. ' example: MOE_PUSH_TEMPLATE IOSAdvanced_2: type: object description: Advanced configuration options for iOS push notifications. properties: coupon_code: type: string description: The coupon code to be included in the push payload. sound_file: type: string description: The name of a custom sound file located in the app bundle to play upon receiving the notification. enable_ios_badge: type: boolean description: Whether this campaign allows the notification to increment the app's badge count. group_key: type: string description: 'The group key used to identify and categorize related push notifications. **Note:** - Use the same group key for all push notifications you want to group - MoEngage automatically modifies the group key to ensure it doesn''t exceed 45 characters - Non-Latin scripts, special characters, and spaces are removed ' collapse_replace_key: type: string description: 'The update key used to identify and update related push notifications. Ensure you use the same update key for all push notifications intended to update each other. ' IOSPushContent_2: type: object description: iOS push notification content. required: - template_type properties: template_type: type: string enum: - BASIC - STYLIZED_BASIC - SIMPLE_IMAGE_CAROUSEL - Custom description: The type of iOS push template. custom_template_id: type: string description: 'The ID of the custom template. **Required** when template_type is "Custom". ' custom_template_version: type: integer description: The version of the custom template. basic_details: $ref: '#/components/schemas/IOSBasicDetails_2' buttons: type: array description: Action buttons for the notification. items: $ref: '#/components/schemas/IOSButton_2' advanced: $ref: '#/components/schemas/IOSAdvanced_2' template_backup: $ref: '#/components/schemas/IOSTemplateBackup_2' WebBasicDetails_2: type: object description: Basic details for the Web push notification. required: - title - message - redirect_url properties: title: type: string description: The title text displayed at the top of the notification. example: Special Offer message: type: string description: The main body text of the notification. example: Check out our latest deals! redirect_url: type: string format: uri description: The URL that the user is redirected to when they click the main body of the notification. example: https://example.com/offers image_url: type: string format: uri description: The URL of a large image to be displayed within the notification content. auto_dismiss_notification: type: boolean description: Whether the notification should auto-dismiss. EmailCampaignTestRequest: title: Email Campaign type: object required: - request_id - channel - basic_details - connector - campaign_content - test_campaign_meta properties: request_id: type: string description: A unique identifier for this test request. example: test_email_12345 channel: type: string enum: - EMAIL description: The communication channel (automatically set to EMAIL for this tab). basic_details: $ref: '#/components/schemas/EmailBasicDetails' connector: $ref: '#/components/schemas/Connector_2' campaign_content: $ref: '#/components/schemas/EmailCampaignContent_2' utm_params: $ref: '#/components/schemas/UTMParams' personalization_details: $ref: '#/components/schemas/PersonalizationDetails_2' test_campaign_meta: $ref: '#/components/schemas/EmailTestCampaignMeta' AndroidButton_2: type: object description: Action button configuration for Android push notifications. required: - btn_name - click_action_type - click_action_value properties: btn_name: type: string description: The text to be displayed on the button. example: Shop Now click_action_type: type: string enum: - DEEPLINKING - NAVIGATE_TO_A_SCREEN - RICH_LANDING - CALL - SHARE - COPY - SET_USER_ATTRIBUTE - TRACK_EVENT - CUSTOM_ACTION - SNOOZE - REMIND_LATER description: The type of action to perform when the button is clicked. click_action_name: type: string description: The name of the click action. click_action_value: type: string description: The URL or deep link to open for the button's action. example: https://example.com/product key_value_pairs: type: array items: $ref: '#/components/schemas/KeyValuePair_2' description: Custom key-value pairs specific to this button's click event. PersonalizedPreviewRequest: type: object required: - request_id - personalization_content - personalization_details properties: request_id: type: string description: A unique identifier for this personalization preview request. example: preview_req_12345 personalization_content: type: object description: 'The content to personalize. **Note:** Either `payload` or `custom_template_data` must be provided. ' properties: payload: type: object additionalProperties: true description: 'Flexible key-value pairs containing content to personalize. Can include any name and number of keys with HTML, text, or Jinja templates. ' example: email_html:

Hi {{UserAttribute['First Name']}}

custom_template_data: type: object description: 'Custom template information. **Required fields when using custom templates:** - template_id - version ' properties: template_id: type: string description: The ID of the custom template. example: 5b7d04c6-8ddc-4957-80d9-c67266079609 version: type: string description: The version of the custom template. example: '1' user_details: type: object description: 'Information about the user to preview for. **Note:** If using user_details, both `identifier` and `identifier_value` are mandatory. ' properties: identifier: type: string description: 'The type of unique identifier used to specify the user. Can be ID, email, phone number, etc. ' example: ID identifier_value: type: string description: The corresponding value of the selected identifier. example: USER_12345 personalization_details: type: object description: "**Important**:\n - When you pass personalization_details, MoEngage uses those values to personalize content instead of actual user profile data.\n - Attributes must exist in the MoEngage dashboard.\n - If an attribute does not exist and default value is not “MOE_NOT_SEND”, it will appear empty.\n - Event attributes can be used when the same event is used for the campaign.\n - You can use event attributes to personalize content APIs when the same event is used for the campaign.\n" required: - channel properties: channel: type: string enum: - EMAIL - PUSH - SMS description: The channel for which to preview personalized content. event_name: type: string description: 'The event name for personalization. **Required** if event attributes are present in the payload. ' example: App_Opened user_attributes: type: object additionalProperties: true description: 'Key-value pairs representing specific user characteristics. Can contain any name and number of keys. ' example: First Name: John Last Name: Doe Gender: Male event_attributes: type: object additionalProperties: true description: 'Key-value pairs describing properties of a particular event. Can contain any name and number of keys. ' example: App_Version: 1.0.2 Campaign Name: Summer Sale IOSTemplateBackup_2: type: object description: 'Fallback notification content for when the template cannot be rendered. **Required for:** Stylized Basic and Simple Image Carousel templates ' required: - title - message properties: title: type: string description: The title for the fallback notification. message: type: string description: The message body for the fallback notification. subtitle: type: string description: The subtitle for the fallback notification. allow_bg_refresh: type: boolean description: Whether to enable background app refresh for the fallback notification. rich_media_type: type: string enum: - Image - Video - GIF description: The type of media attachment for the fallback. rich_media_value: type: string format: uri description: The URL of the media attachment for the fallback. default_click_action: type: string enum: - DEEPLINKING - NAVIGATE_TO_A_SCREEN - RICH_LANDING description: The default click action for the fallback notification. default_click_action_value: type: string description: The URL or deep link for the fallback's click action. key_value_pairs: type: array items: $ref: '#/components/schemas/KeyValuePair_2' description: Custom key-value pairs specific to the fallback payload. Connector_2: type: object description: Email connector configuration for sending email campaigns. required: - connector_type - connector_name properties: connector_type: type: string description: The type of connector service (e.g., SENDGRID, AWS SES, etc.). example: SENDGRID connector_name: type: string description: The name of the connector configuration. example: default WebAdvanced_2: type: object description: Advanced configuration options for Web push notifications. properties: icon_image_type: type: string enum: - DEFAULT - ICON_URL description: The type of icon to use for the notification. icon_url: type: string format: uri description: The URL for a custom notification icon. WebPushContent_2: type: object description: Web push notification content. required: - template_type - basic_details properties: template_type: type: string enum: - BASIC description: The template type for web push (currently only BASIC is supported). basic_details: $ref: '#/components/schemas/WebBasicDetails_2' buttons: type: array description: Action buttons for the notification. items: $ref: '#/components/schemas/WebButton_2' advanced: $ref: '#/components/schemas/WebAdvanced_2' CarouselContent_2: type: object description: 'Configuration for image carousel in Simple Image Carousel template. **Required for:** Simple Image Carousel template ' required: - slider_transition - slide_data properties: slider_transition: type: string enum: - manual - automatic description: The transition type for the carousel slides. slide_data: type: array description: Array of slide configurations. items: type: object required: - image_url properties: image_url: type: string format: uri description: The image URL for this slide. image_click_action: type: string enum: - DEEPLINKING - RICH_LANDING - NAVIGATE_TO_A_SCREEN description: The click action for this slide's image. image_click_action_value: type: string description: 'The click action value for this slide''s image. **Required** when image_click_action is provided. ' key_value_pairs: type: array items: $ref: '#/components/schemas/KeyValuePair_2' IOSBasicDetails_2: type: object description: Basic details for the iOS push notification. required: - title - message properties: background_color_code: type: string description: 'The hexadecimal color code for the notification''s background. **Supported Templates:** Simple Image Carousel, Stylized Basic ' example: '#a0a0a0' apply_background_color_in_text_editor: type: boolean description: 'Whether to apply the background color within the text editor view. **Supported Templates:** Simple Image Carousel, Stylized Basic ' title: type: string description: The main title of the push notification. example: New Message message: type: string description: The main body text of the notification. example: You have a new message waiting for you subtitle: type: string description: The subtitle displayed below the main title. allow_bg_refresh: type: boolean description: Whether to allow the app to be woken up in the background to refresh content. rich_media_type: type: string enum: - Image - Video - GIF description: 'The type of rich media to be included in the notification. **Supported Templates:** Basic ' rich_media_value: type: string format: uri description: 'The URL of the rich media asset specified in the rich_media_type field. **Supported Templates:** Basic ' image_url: type: string format: uri description: 'The URL of a large image to be displayed within the notification content. **Note:** Required when template_type is SIMPLE_IMAGE_CAROUSEL. ' input_gif_url: type: string format: uri description: 'The URL for the GIF media used in the push campaign content. **Supported Templates:** Basic, Stylized Basic ' carousel_content: $ref: '#/components/schemas/IOSCarouselContent_2' default_click_action: type: string enum: - DEEPLINKING - NAVIGATE_TO_A_SCREEN - RICH_LANDING description: The action performed when the main body of the notification is tapped. default_click_action_value: type: string description: The URL or deep link associated with the default click action. key_value_pairs: type: array items: $ref: '#/components/schemas/KeyValuePair_2' description: Custom key-value pairs sent with the push payload for in-app handling. PersonalizedPreviewResponse: type: object description: Response containing the personalized content. properties: personalized_content: type: object description: The personalized content with all attributes resolved. properties: payload: type: object additionalProperties: true description: 'The personalized content with all user/event attributes and personalization elements resolved. Structure mirrors the input payload with personalized values filled in. ' GmailAnnotations: type: object description: 'Gmail Annotations shown in Gmail''s Promotions tab. Two annotation types are supported: `deal_card` and `product_carousel`. These are mutually exclusive — include only one per campaign. **Note:** `gmail_annotations` is only supported when `content_type` is `PROMOTIONAL`. Using it with `TRANSACTIONAL` returns a `400` error. ' required: - send_email_if_personalization_fails - sender_logo - sender_logo_type properties: send_email_if_personalization_fails: type: boolean description: 'Whether to send the email if personalization of any Gmail annotation field fails. **Required** when `gmail_annotations` is present. ' example: true sender_logo: type: string description: 'The sender logo shown in the Gmail annotation. Accepts a valid HTTPS URL or a MoEngage personalization token. **Required** when `gmail_annotations` is present. ' example: https://example.com/logo.png sender_logo_type: type: string enum: - image_url - uploaded_image description: 'The source type of the sender logo. **Required** when `sender_logo` is provided. ' example: image_url deal_card: description: 'The Deal Card annotation. **Optional.** Use either `deal_card` or `product_carousel` — not both. ' allOf: - $ref: '#/components/schemas/GmailAnnotationsDealCard' product_carousel: description: 'The Product Carousel annotation. **Optional.** Use either `product_carousel` or `deal_card` — not both. ' allOf: - $ref: '#/components/schemas/GmailAnnotationsProductCarousel' VariationDetails_2: type: object description: Configuration for A/B testing variations. required: - distribution_type - no_of_variations properties: distribution_type: type: string enum: - SHERPA - MANUAL description: The distribution type for variations. no_of_variations: type: integer description: The number of variations for the campaign. minimum: 1 example: 2 manual_distribution_percentage: type: object description: 'Manual percentage distribution for each variation. **Required** when distribution_type is MANUAL. ' additionalProperties: type: string example: variation_1: '50' variation_2: '45' sherpa_campaign_duration: type: integer description: 'The Sherpa campaign duration. **Required** when distribution_type is SHERPA. ' sherpa_distribution_metric: type: string enum: - OPEN RATE - CLICK RATE - BOTH description: 'The Sherpa distribution metric. **Required** when distribution_type is SHERPA. ' PushCampaignContent_2: type: object description: Contains the content and variations for the Push campaign. required: - content properties: locales: type: array items: type: string description: 'List of locales for multi-language campaigns. You can send campaigns in multiple languages using locales. ' example: - en-US - es-ES - default variation_details: $ref: '#/components/schemas/VariationDetails_2' content: type: object description: The actual Push campaign content. required: - push properties: push: $ref: '#/components/schemas/PushContent' AndroidBasicDetails_2: type: object description: "Basic details for the Android push notification. \n\nFields vary by template_type. All templates support common fields like title, message, default_click_action.\n" required: - notification_channel - title - message - default_click_action - default_click_action_value properties: notification_channel: type: string description: The Android notification channel where the push will be sent. example: general include_app_name_and_time: type: boolean description: 'Whether to include the application''s name and timestamp within the banner image. **Supported Templates:** Image Banner with Text ' background_color_code: type: string description: 'The hex code for the notification''s background color. **Supported Templates:** Stylized Basic, Simple Image Carousel, Image Banner with Text ' example: '#9a4444' app_name_color_code: type: string description: 'The hex code for the color of the application''s name text. **Supported Templates:** Stylized Basic, Simple Image Carousel, Image Banner with Text ' example: '#dea1a1' notification_control_color: type: string enum: - LIGHT - DARK description: 'The color scheme for the notification''s control elements (action buttons). **Supported Templates:** Stylized Basic, Simple Image Carousel, Image Banner with Text ' include_title_and_message: type: boolean description: 'Whether to include the notification''s title and message text within the banner image. **Supported Templates:** Image Banner with Text ' apply_background_color_in_text_editor: type: boolean description: 'Whether to apply the specified background color within the rich text editor for preview. **Supported Templates:** Stylized Basic, Simple Image Carousel, Image Banner with Text ' title: type: string description: The main title of the push notification. example: Limited Time Offer! message: type: string description: 'The message body of the push notification. You can use HTML in the message parameter to apply rich text formatting, including text color and styles. ' example: Get 50% off on all items. Shop now! summary: type: string description: The summary text for the notification. image_url: type: string format: uri description: The image URL for the push notification. example: https://example.com/images/promo.jpg image_scaling: type: string enum: - FIT_INSIDE_IMAGE_CONTAINER - FILL_IMAGE_CONTAINER description: 'The scaling behavior for images within the carousel template. **Supported Templates:** Simple Image Carousel, Image Banner with Text ' banner_image_url: type: string format: uri description: 'The URL for the background image used in the Image Banner Text template. **Required for:** Image Banner with Text template ' input_gif_url: type: string format: uri description: 'The URL for the GIF media used in the push campaign content. **Supported Templates:** Basic ' collapsed_push_notification: type: string description: 'The configuration for the notification''s collapsed state (view before user expands it). **Supported Templates:** Image Banner with Text ' example: SAME_AS_TEMPLATE_BACKUP carousel_content: $ref: '#/components/schemas/CarouselContent_2' default_click_action: type: string enum: - DEEPLINKING - NAVIGATE_TO_A_SCREEN - RICH_LANDING description: The action performed when the main body of the notification is clicked. default_click_action_value: type: string description: The URL or deep link to open when the notification is clicked. example: https://example.com/sale key_value_pairs: type: array items: $ref: '#/components/schemas/KeyValuePair_2' description: Custom key-value pairs for the notification payload. PlatformSpecificDetails_2: type: object description: Platform-specific configuration details. properties: android: type: object properties: push_amp_plus_enabled: type: boolean description: Whether Push Amp+ feature is enabled for this campaign. default: false ios: type: object properties: send_to_all_eligible_device: type: boolean description: Whether to send the campaign to all eligible devices. exclude_provisional_push_devices: type: boolean description: Whether to exclude provisional push devices. send_to_only_provisional_push_enabled_devices: type: boolean description: Whether to send only to provisional push-enabled devices. description: '**Note:** You must pass one of these keys as true for iOS. ' TestCampaignSuccessResponse: type: object description: Response after successfully sending a test campaign. properties: data: type: object additionalProperties: type: object properties: status: type: string enum: - success - failed description: The status of the test campaign delivery for this identifier. failure_reason: type: string description: The reason for failure (only present if status is "failed"). description: '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: type: string description: A success message. example: Test campaign created successfully PushBasicDetails: type: object description: Contains the basic information about the Push campaign. required: - name - platforms - platform_specific_details properties: name: type: string description: The name of the campaign. example: Summer Sale Push Notification business_event: type: string description: 'The business event to be mapped to the campaign. **Required** for BUSINESS_EVENT_TRIGGERED campaigns. ' example: user_signup tags: type: array items: type: string description: Tags that provide context about the campaign's nature or theme. example: - activation - summer_sale team: type: string description: 'The name of the team collaborating on this campaign. For more information, refer to [Teams in MoEngage](/user-guide/settings/account/team-management/teams-in-moengage). ' example: marketing_team platforms: type: array items: type: string enum: - ANDROID - IOS - WEB description: The platforms to target for this Push campaign. example: - ANDROID - IOS broadcast_live_activity_id: type: string description: 'The broadcast live activity ID for iOS Live Activities. **Required** when platform is iOS and delivery_type is BROADCAST_LIVE_ACTIVITY. ' example: live_check123 geofences: $ref: '#/components/schemas/Geofences_2' send_to_triggered_platform_only: type: boolean description: Whether to send the campaign only to the platform that triggered the event. Applicable for event-triggered campaigns. platform_specific_details: $ref: '#/components/schemas/PlatformSpecificDetails_2' EmailContent_2: type: object description: Email campaign content. required: - subject - sender_name - from_address - reply_to_address properties: subject: type: string description: The subject line of the email. example: Exclusive Summer Sale - 50% Off! preview_text: type: string description: The preview text shown in email clients. example: Dont miss out on our biggest sale of the season sender_name: type: string description: The name of the sender that appears in the email. example: MoEngage Team from_address: type: string format: email description: The sender's email address. example: noreply@moengage.com reply_to_address: type: string format: email description: The reply-to email address. example: support@moengage.com cc_ids: type: array items: type: string format: email description: Email addresses to CC. bcc_ids: type: array items: type: string format: email description: Email addresses to BCC. html_content: type: string description: 'The HTML content of the email. **Optional** if custom_template_id is provided. ' example:

Hello {{UserAttribute['First Name']}}

email_editor: type: string enum: - Froala Editor - Ace Editor description: 'The HTML editor used for the email campaign. - **Required** if you want to create the campaign using the `Ace Editor`. - **Optional** if you want to use the default `Froala Editor`. ' example: Ace Editor custom_template_id: type: string description: 'The ID of a custom email template. **Optional** if html_content is provided. When this field is provided, the following fields are not required: - subject - preview_text - sender_name ' custom_template_version: type: integer description: The version of the custom template. attachments: type: array items: type: object properties: file_type: type: string enum: - URL - PERSONALIZED_ATTACHMENT url: type: string description: Attachments to include in the email. gmail_annotations: $ref: '#/components/schemas/GmailAnnotations' GmailAnnotationsDealCard: type: object description: 'Deal Card annotation shown in Gmail''s Promotions tab. All four fields below are required when `deal_card` is present. ' required: - description - discount_code - availability_starts - availability_ends properties: description: type: string description: 'Short deal description shown in the Gmail annotation. **Required** when `deal_card` is present. ' example: Get 20% off on all orders above $50 discount_code: type: string description: 'Promo or discount code displayed with the deal. **Required** when `deal_card` is present. ' example: SAVE20 availability_starts: type: string description: 'ISO 8601 datetime indicating when the deal becomes active. Use the timezone of the promotion, not your server or API caller timezone. Ensure the timezone matches the promotion''s local timezone so the deal displays the correct active and expiry times for your audience. **Accepted formats:** - UTC (`Z` suffix): `YYYY-MM-DDTHH:mm:ssZ` (for example, `2026-06-01T00:00:00Z`). - Positive offset: `YYYY-MM-DDTHH:mm:ss+HH:MM` (for example, `2026-06-01T00:00:00+05:30` for IST). - Negative offset: `YYYY-MM-DDTHH:mm:ss-HH:MM` (for example, `2026-06-01T00:00:00-07:00` for US Pacific PDT). **Common offsets:** IST `+05:30`, SGT `+08:00`, GST `+04:00`, CET `+01:00` or `+02:00` (DST), EST `-05:00`, EDT `-04:00`, PST `-08:00`, PDT `-07:00`, UTC `Z` or `+00:00`. **Required** when `deal_card` is present. ' example: '2026-06-01T00:00:00Z' availability_ends: type: string description: 'ISO 8601 datetime indicating when the deal expires. Same format as `availability_starts`. Use the timezone of the promotion, not your server or API caller timezone. Ensure the timezone matches the promotion''s local timezone so the deal displays the correct active and expiry times for your audience. Must be at least 1 hour after `availability_starts`. **Required** when `deal_card` is present. ' example: '2026-06-30T23:59:59Z' ErrorResponse: type: object properties: error: type: object properties: code: type: string description: The error code (e.g., "400 Bad Request"). message: type: string description: Description of why the request failed. target: type: string description: The target of the error. details: type: array items: type: object properties: target: type: string message: type: string request_id: type: string description: The request ID associated with this error. CampaignTestRequest: oneOf: - $ref: '#/components/schemas/PushCampaignTestRequest' - $ref: '#/components/schemas/EmailCampaignTestRequest' discriminator: propertyName: channel mapping: PUSH: '#/components/schemas/PushCampaignTestRequest' EMAIL: '#/components/schemas/EmailCampaignTestRequest' EmailBasicDetails: type: object description: Contains the basic information about the Email campaign. required: - name - content_type - user_attribute_identifier properties: name: type: string description: The name of the campaign. example: Summer Sale Email business_event: type: string description: 'The business event to be mapped to the campaign. **Required** for BUSINESS_EVENT_TRIGGERED campaigns. ' example: user_signup content_type: type: string enum: - PROMOTIONAL - TRANSACTIONAL description: The type of content in the campaign. subscription_category: type: string description: 'The subscription category for promotional email campaigns. This targets only users who have opted-in to receive communication about this category. **Required** for PROMOTIONAL email campaigns. ' example: music tags: type: array items: type: string description: Tags that provide context about the campaign's nature or theme. example: - activation - summer_sale team: type: string description: 'The name of the team collaborating on this campaign. For more information, refer to [Teams in MoEngage](/user-guide/settings/account/team-management/teams-in-moengage). ' example: marketing_team user_attribute_identifier: type: string description: 'The user attribute that stores the email address. Standard identifier is `MOE_EMAIL_ID`. ' example: MOE_EMAIL_ID default: MOE_EMAIL_ID send_only_double_opt_in_users: type: boolean description: 'Whether to send the campaign only to users who have completed double opt-in. When `false` or omitted, the campaign sends to all eligible users. Ensure the Double Opt-In feature is enabled for your workspace. ' default: false example: true deduplication_attribute: type: string description: 'The user attribute used for brand deduplication. Pass `""` (empty string) or omit the field to treat the campaign as single-brand. For multi-brand deduplication, pass the backend attribute name that stores the brand identifier (for example, `u_em`). Always use the backend attribute name (for example, `u_em`), not the display label (for example, `Email (Standard)`). Ensure the Brand Deduplication feature is enabled for your workspace. ' default: '' example: u_em AndroidAdvanced_2: type: object description: Advanced configuration options for Android push notifications. properties: coupon_code: type: string description: The coupon code to be included in the push payload. example: SUMMER50 icon_type_in_notification: type: string description: The icon type to be included in the push payload. example: app_icon use_large_icon: type: boolean description: Whether to use a large icon in the notification. make_notification_sticky: type: boolean description: 'When enabled, the user cannot swipe away the notification. ' dismiss_button_text: type: string description: 'The text to display on the dismiss button. **Required** when make_notification_sticky is true or auto_dismiss_notification is true. ' auto_dismiss_notification: type: boolean description: Whether the notification can be auto-dismissed. auto_dismiss_notification_time_value: type: integer description: 'The time value after which to auto-dismiss the notification. **Required** when auto_dismiss_notification is true. ' auto_dismiss_notification_time_granularity: type: string enum: - DAYS - HOURS - MINUTES description: 'The time unit for auto-dismiss. **Required** when auto_dismiss_notification is true. ' group_key: type: string description: 'The group key used to identify and categorize related push notifications. **Note:** - Use the same group key for all push notifications you want to group - MoEngage automatically modifies the group key to ensure it doesn''t exceed 45 characters - Non-Latin scripts, special characters, and spaces are removed ' collapse_replace_key: type: string description: 'The update key used to identify and update related push notifications. Ensure you use the same update key for all push notifications intended to update each other. ' PushCampaignTestRequest: title: Push Campaign type: object required: - request_id - channel - basic_details - campaign_content - test_campaign_meta properties: request_id: type: string description: A unique identifier for this test request. example: test_push_12345 channel: type: string enum: - PUSH description: The communication channel (automatically set to PUSH for this tab). basic_details: $ref: '#/components/schemas/PushBasicDetails' campaign_content: $ref: '#/components/schemas/PushCampaignContent_2' personalization_details: $ref: '#/components/schemas/PersonalizationDetails_2' test_campaign_meta: $ref: '#/components/schemas/PushTestCampaignMeta' IOSCarouselContent_2: type: object description: 'Configuration for image carousel in Simple Image Carousel template. **Required for:** Simple Image Carousel template ' required: - slider_transition - slide_data properties: slider_transition: type: string enum: - MANUAL - AUTOMATIC description: The transition type for the carousel slides. slide_data: type: array description: Array of slide configurations. items: type: object required: - image_url properties: image_url: type: string format: uri description: The image URL for this slide. image_click_action: type: string enum: - DEEPLINKING - RICH_LANDING - NAVIGATE_TO_A_SCREEN description: The click action for this slide's image. image_click_action_value: type: string description: The click action value for this slide's image. key_value_pairs: type: array items: $ref: '#/components/schemas/KeyValuePair_2' WebButton_2: type: object description: Action button configuration for Web push notifications. required: - title properties: title: type: string description: The text displayed on the button. example: View Offer icon_url: type: string format: uri description: The URL of an icon to be displayed next to the button text. url: type: string format: uri description: The destination URL that the user is redirected to when they click this button. GmailAnnotationsProductCarouselManualData: type: object description: 'Manual product list for the Gmail Annotations product carousel. **Required** when `product_carousel.type` is `MANUAL`. Minimum 2 products required. ' required: - currency - products properties: currency: type: string description: 'ISO 4217 currency code applied to all products in the carousel. **Required** when `manual_data` is present. ' example: USD products: type: array description: 'List of products to display in the carousel. **Required** when `manual_data` is present. Minimum 2 products. ' minItems: 2 items: $ref: '#/components/schemas/GmailAnnotationsProductCarouselManualProduct' EmailTestCampaignMeta: type: object description: 'Metadata for specifying test recipients for Email campaigns. ' required: - identifier - identifier_values properties: identifier: type: string enum: - EMAIL - ID - CUSTOM_SEGMENT - MOBILE_NUMBER description: 'The type of identifier used to target test users. - **EMAIL**: Email address (content will not be personalized with user profile data) - **ID**: User ID from your system - **CUSTOM_SEGMENT**: User-defined segment - **MOBILE_NUMBER**: User''s mobile phone number ' identifier_values: type: array items: type: string description: 'Array of identifier values to send the test campaign to. **Note:** Maximum 10 users at a time. ' maxItems: 10 example: - john.doe@example.com - jane.smith@example.com locale_name: type: string description: The locale name to use for the test campaign (when using multi-locale campaigns). example: en-US variation: type: string description: The variation name to use for the test campaign (when using A/B testing). example: variation_1 PersonalizationDetails_2: type: object description: "Override values for personalizing campaign content during testing.\n\n**Important**: \n - When you pass personalization details in the personalization_details object of this API, MoEngage uses those details to personalize the user attributes or event attributes present in the content instead of the attributes present in the user profile.\n - You can use this API only for 10 users at a time.\n - The same personalization details are used across all users. For example, you pass the first name as Dave in personalization details, you have used the first name in the content, and there are 10 users. In this case, all 10 users will get the same first name (Dave).\n" properties: user_attributes: type: object additionalProperties: true description: 'Key-value pairs for user attribute personalization. The same values are used for all test recipients. ' example: First Name: John Last Name: Doe Email: john.doe@example.com event_attributes: type: object additionalProperties: true description: 'Key-value pairs for event attribute personalization. If you pass only a subset of attributes, remaining values are picked from the user profile. ' example: Campaign Name: Test Campaign Campaign Channel: Email responses: V5InternalError: description: Unhandled server-side failure. content: application/json: schema: $ref: '#/components/schemas/V5ErrorEnvelope' example: response_id: abc-101 error: code: INTERNAL_ERROR message: Internal server error. details: [] V5Unauthorized: description: Authentication failure. content: application/json: schema: $ref: '#/components/schemas/V5ErrorEnvelope' example: response_id: abc-101 error: code: UNAUTHORIZED message: Invalid or missing credentials. details: [] V5ValidationError: description: Request failed schema or component validation. content: application/json: schema: $ref: '#/components/schemas/V5ErrorEnvelope' example: response_id: abc-101 error: code: VALIDATION_FAILED message: One or more fields failed validation. request_id: req-push-001 details: - target: campaign_delivery_type message: campaign_delivery_type value is required. InternalServerError: description: Internal Server Error - Unexpected system error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: 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: '' Unauthorized: description: Authentication Failure - Invalid or missing authentication credentials content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: 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: '' RateLimitExceeded: description: Rate Limit Breach - Too many requests content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: error: code: 429 conflict message: rate_limit target: '' details: - target: rate_limit message: Rate limiting breached request_id: 3UXNNGsqV BadRequest: description: Bad Request - Missing or invalid parameters content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' example: 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' parameters: Idempotency-Key-Required: name: Idempotency-Key in: header required: true description: '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. ' schema: type: string format: uuid X-MOE-Request-Id: name: X-MOE-Request-Id in: header required: true description: 'Correlates with `response_id`. Supply this header or `request_id` in the body; if both are set, they must match. ' schema: type: string MOE-APPKEY: name: MOE-APPKEY in: header required: true description: 'Your MoEngage Workspace ID (App ID). Find it in the dashboard at **Settings** > **Account** > **APIs** > **Workspace ID**. ' schema: type: string example: '{{workspace_id}}' MOE-APPKEY_2: name: MOE-APPKEY in: header required: true description: '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)**. ' schema: type: string example: YOUR_WORKSPACE_ID securitySchemes: BasicAuth: type: http scheme: basic description: '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](/api/introduction#getting-your-credentials). Send the value in the `Authorization` header as `Basic` followed by Base64-encoding of `appkey:apisecret` (workspace ID and API key). ' x-refined-from: - moengage-campaign-draft-openapi.yml - moengage-campaigns-openapi.yml