> ## Documentation Index
> Fetch the complete documentation index at: https://moengage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Test Campaign (V5)

> Sends a test Push or Email message to specific users or device identifiers before publishing the campaign.


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.  |


## OpenAPI

````yaml /api/campaigns/campaign-draft.yaml post /v5/campaigns/test
openapi: 3.0.3
info:
  title: MoEngage Campaigns API
  version: '2025-11-20'
  description: >
    The Campaigns V5 API manages the draft campaign lifecycle — draft creation,
    incremental updates, validation, test sends, and post-publish management.


    **Note:** Campaign publishing is not yet supported in V5. To publish
    campaigns, use the V1 API (`PATCH
    /core-services/v1/campaigns/{campaign_id}`) in the interim.


    **Supported channels:**

    - Push (Android, iOS, Web)

    - Email


    **Supported delivery types:**

    - ONE_TIME

    - PERIODIC

    - EVENT_TRIGGERED

    - BUSINESS_EVENT_TRIGGERED

    - DEVICE_TRIGGERED (Push only)

    - LOCATION_TRIGGERED (Push only)

    - BROADCAST_LIVE_ACTIVITY (Push iOS only)


    **Campaign lifecycle:**


    1. **Create** - Start a draft with only the required fields (`channel`,
    `campaign_delivery_type`, `created_by`). Add content, audience, and
    scheduling incrementally across subsequent update calls.

    2. **Update** - Patch individual components as you refine the setup. Each
    submitted component is validated in full before the draft is updated.

    3. **Validate** - Check whether a draft would pass publish-time validation
    without committing any changes.

    4. **Test** - Send a test message to specific users from either a saved
    draft or inline content before going live.

    5. **Manage** - Pause, resume, or stop a live campaign. Search your
    workspace and retrieve lightweight metadata across all campaigns.


    **Campaign versioning** is optional per workspace:

    - When enabled, publishing an update to a live campaign creates a new
    document with an incremented `version_number`.

    - `campaign_id` is the stable identifier across all versions; each version
    has its own raw `id` (ObjectId).


    **Authentication header:** Pass your Workspace ID in the `MOE-APPKEY`
    request header, the same as in V1.
  contact:
    name: MoEngage Developer Team
    email: support@moengage.com
    url: https://developers.moengage.com
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).
security:
  - BasicAuth: []
paths:
  /v5/campaigns/test:
    post:
      tags:
        - Test Campaigns
      summary: Test Campaign (V5)
      description: >
        Sends a test Push or Email message to specific users or device
        identifiers before publishing the campaign.
      operationId: test_campaign_v5
      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'
components:
  parameters:
    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}}'
    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
    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
  schemas:
    TestV5Request:
      oneOf:
        - $ref: '#/components/schemas/TestV5PushRequest'
        - $ref: '#/components/schemas/TestV5EmailRequest'
      discriminator:
        propertyName: channel
        mapping:
          PUSH:
            $ref: '#/components/schemas/TestV5PushRequest'
          EMAIL:
            $ref: '#/components/schemas/TestV5EmailRequest'
    V5SuccessEnvelope:
      type: object
      properties:
        response_id:
          type: string
        type:
          type: string
          example: campaign
        data:
          type: object
    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
    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.
    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'
    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'
    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'
    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`.

            <Warning>

            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.

            </Warning>


            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'
    PersonalizationDetails:
      type: object
      description: >
        Overrides user and event attribute values used to render personalised
        content during the test send.

        When supplied, these values replace what would normally be fetched from
        the stored user profile,

        useful for testing personalised content without needing a matching user
        record in MoEngage.


        <details>

        <summary>Test with personalization overrides</summary>


        ```json

        {
          "draft_id": "{{campaign_id}}",
          "personalization_details": {
            "user_attributes": {
              "First Name": "{{first_name}}",
              "City": "{{city}}"
            },
            "event_attributes": {
              "product_name": "{{product_name}}",
              "price": 79.99
            }
          },
          "test_campaign_meta": {
            "identifier": "USER_ATTRIBUTE_UNIQUE_ID",
            "identifier_values": [
              "{{user_unique_id}}"
            ]
          }
        }

        ```


        </details>
      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
    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:


            **Push campaigns:**

            - `USER_ATTRIBUTE_UNIQUE_ID` - Permanent internal user ID (for
            example, `USER_1138`).

            - `USER_ATTRIBUTE_USER_EMAIL` - User's email address (for example,
            `jane@example.com`).

            - `USER_ATTRIBUTE_USER_MOBILE` - User's mobile number in E.164
            format (for example, `+14155550101`).

            - `MOE_GAID` - Google Advertising ID (Android devices).

            - `ADVERTISING_IDENTIFIER` - Resettable advertising ID (GAID on
            Android, IDFA on iOS).

            - `PUSH_ID` - Unique device push token.

            - `CUSTOM_SEGMENT` - User-defined segment.


            **Email campaigns:**

            - `EMAIL` - Email address. Content will not be personalised with
            user profile data if no matching record exists in MoEngage.

            - `ID` - MoEngage internal user ID.

            - `MOBILE_NUMBER` - User's mobile number in E.164 format.

            - `CUSTOM_SEGMENT` - User-defined segment.


            <details>

            <summary>USER_ATTRIBUTE_UNIQUE_ID</summary>


            ```json

            {
              "draft_id": "{{campaign_id}}",
              "test_campaign_meta": {
                "identifier": "USER_ATTRIBUTE_UNIQUE_ID",
                "identifier_values": [
                  "{{user_unique_id}}"
                ]
              }
            }

            ```


            </details>

            <details>

            <summary>EMAIL</summary>


            ```json

            {
              "draft_id": "{{campaign_id}}",
              "test_campaign_meta": {
                "identifier": "EMAIL",
                "identifier_values": [
                  "{{recipient_email}}"
                ]
              }
            }

            ```


            </details>

            <details>

            <summary>MOE_GAID (Android)</summary>


            ```json

            {
              "draft_id": "{{campaign_id}}",
              "test_campaign_meta": {
                "identifier": "MOE_GAID",
                "identifier_values": [
                  "{{moe_gaid}}"
                ]
              }
            }

            ```


            </details>

            <details>

            <summary>PUSH_ID</summary>


            ```json

            {
              "draft_id": "{{campaign_id}}",
              "test_campaign_meta": {
                "identifier": "PUSH_ID",
                "identifier_values": [
                  "{{push_id}}"
                ]
              }
            }

            ```


            </details>

            <details>

            <summary>CUSTOM_SEGMENT</summary>


            ```json

            {
              "draft_id": "{{campaign_id}}",
              "test_campaign_meta": {
                "identifier": "CUSTOM_SEGMENT",
                "identifier_values": [
                  "{{custom_segment_name}}"
                ]
              }
            }

            ```


            </details>
        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`).

            If omitted, the server sends one test per variation defined in the
            draft.


            <details>

            <summary>Target a single A/B variation</summary>


            ```json

            {
              "draft_id": "{{campaign_id}}",
              "test_campaign_meta": {
                "identifier": "USER_ATTRIBUTE_UNIQUE_ID",
                "identifier_values": [
                  "{{user_unique_id}}"
                ],
                "variation": "variation_2"
              }
            }

            ```


            </details>
          example: '{{variation_name}}'
        locale_name:
          type: string
          description: >
            Locale name to target for this test send (for example, `en`, `fr`).

            If omitted, the server sends one test per locale defined in the
            draft.


            <details>

            <summary>Target a single locale</summary>


            ```json

            {
              "draft_id": "{{campaign_id}}",
              "test_campaign_meta": {
                "identifier": "USER_ATTRIBUTE_UNIQUE_ID",
                "identifier_values": [
                  "{{user_unique_id}}"
                ],
                "locale_name": "es-ES"
              }
            }

            ```


            </details>
          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.

            If omitted, the server sends one test per platform defined in the
            draft.


            <details>

            <summary>Target a single platform (iOS only)</summary>


            ```json

            {
              "draft_id": "{{campaign_id}}",
              "test_campaign_meta": {
                "identifier": "USER_ATTRIBUTE_UNIQUE_ID",
                "identifier_values": [
                  "{{user_unique_id}}"
                ],
                "platform": "IOS"
              }
            }

            ```


            </details>
    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)
    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.
    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'
    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).
    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.
    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. 

            **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.


            **Required** when `distribution_type` is `MANUAL`.
          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`.
    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'
    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: >-
            <!DOCTYPE html><html><head></head><body><p>Hello
            {{UserAttribute['First Name']}}</p></body></html>
        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.
    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'
    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'
    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'
    AndroidBasicDetails:
      type: object
      description: >
        Basic details for the Android push notification. 


        Fields vary by template_type. All templates support common fields like
        title, message, default_click_action.
      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.
    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'
    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.
    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.
    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.
    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.
    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
    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.
    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.
    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.
    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.
    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.
    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'
    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.
    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'
  responses:
    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.
    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: []
    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: []
  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).

````