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

# Update Campaign

> This API updates an existing Push or Email campaign in MoEngage. You can only update campaigns created via the API, not campaigns created through the MoEngage dashboard.


<Warning>
  **Update Restrictions**

  You cannot update campaigns when in **Stopped** or **Archived** state.

  For **Scheduled Campaigns**

  * You can edit all fields **except scheduling type** for One-Time campaigns.
  * You can edit all fields **except scheduling type** for Periodic/Event-Triggered campaigns if no instance has been sent yet.

  For **Active Campaigns**, you cannot edit the following fields:

  * Trigger Condition
  * Segmentation Details
  * Conversion Goal Details
  * Scheduling Type
  * Scheduling Start Date

  For **Event-Triggered campaigns**, updated content is cached and takes up to 30 minutes to take effect.
</Warning>


## OpenAPI

````yaml /api/campaigns/campaigns.yaml patch /campaigns/{campaign_id}
openapi: 3.0.3
info:
  title: MoEngage Campaigns API
  version: '2025-11-20'
  description: >
    The MoEngage Campaigns API allows you to create and manage Push and Email
    campaigns programmatically.


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


    **Rate Limits:** 5 campaigns per minute, 25 campaigns per hour, 100
    campaigns per day.


    <Info>

    If this API is not enabled for your account, contact your MoEngage Customer
    Success Manager (CSM) or the Support team to request enablement.

    </Info>


    For more details, visit [MoEngage Developer
    Documentation](https://developers.moengage.com).
  contact:
    name: MoEngage Developer Team
    email: support@moengage.com
    url: https://developers.moengage.com
servers:
  - url: https://api-{dc}.moengage.com/core-services/v1
    description: MoEngage Campaigns API Server
    variables:
      dc:
        default: '01'
        description: >-
          Your MoEngage Data Center (DC). Can be 01, 02, 03, etc. Find your data
          center number on the MoEngage Data Centers page.
security:
  - BasicAuth: []
paths:
  /campaigns/{campaign_id}:
    patch:
      tags:
        - Update Campaigns
      summary: Update Campaign
      description: >
        This API updates an existing Push or Email campaign in MoEngage. You can
        only update campaigns created via the API, not campaigns created through
        the MoEngage dashboard.
      operationId: update_campaign
      parameters:
        - name: campaign_id
          in: path
          required: true
          description: >
            The unique ID of the campaign to update.


            You can fetch the campaign ID using the [Get Campaign Details
            API](https://developers.moengage.com/hc/en-us/articles/27896777540756)
            by filtering with campaign name, channel, or other criteria.
          schema:
            type: string
          example: camp_abc123xyz
        - $ref: '#/components/parameters/MOE-APPKEY'
      requestBody:
        description: >
          In this payload, you can include the fields you want to update.


          **Notes:** 

          - Pass only the fields you want to update. You don't need to send the
          complete payload.

          - If updating a field within an object, you must pass the complete
          object.

          - If updating a nested field, you must pass the complete parent
          object. For example, to update the title of a Push notification, pass
          the complete campaign_content object.

          - 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/CampaignUpdateRequest'
            examples:
              push_update_content:
                summary: Push - Update Content
                value:
                  request_id: push_update_12345
                  updated_by: john.doe@example.com
                  campaign_content:
                    content:
                      push:
                        android:
                          template_type: BASIC
                          basic_details:
                            notification_channel: general
                            title: Updated Title - Flash Sale!
                            message: Updated Message - Only 2 hours left!
                            default_click_action: DEEPLINKING
                            default_click_action_value: https://example.com/flash-sale
                        ios:
                          template_type: BASIC
                          basic_details:
                            title: Updated Title - Flash Sale!
                            message: Updated Message - Only 2 hours left!
                            default_click_action: DEEPLINKING
                            default_click_action_value: https://example.com/flash-sale
              email_update_content:
                summary: Email - Update Content
                value:
                  request_id: email_update_12345
                  updated_by: john.doe@example.com
                  campaign_content:
                    content:
                      email:
                        subject: Updated Subject - Last Chance for 50% Off!
                        preview_text: Sale ends tonight
                        sender_name: MoEngage Store
                        from_address: noreply@example.com
                        reply_to_address: support@example.com
                        html_content: >-
                          <!DOCTYPE html><html><body><h1>Last
                          Chance!</h1><p>Sale ends tonight!</p></body></html>
              push_update_scheduling:
                summary: Push - Update Scheduling
                value:
                  request_id: push_sched_update
                  updated_by: john.doe@example.com
                  scheduling_details:
                    expiry_time: '2026-07-20T13:55:00'
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    MOE-APPKEY:
      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
  schemas:
    CampaignUpdateRequest:
      oneOf:
        - $ref: '#/components/schemas/PushCampaignUpdateRequest'
        - $ref: '#/components/schemas/EmailCampaignUpdateRequest'
      discriminator:
        propertyName: channel
        mapping:
          PUSH:
            $ref: '#/components/schemas/PushCampaignUpdateRequest'
          EMAIL:
            $ref: '#/components/schemas/EmailCampaignUpdateRequest'
    PushCampaignUpdateRequest:
      title: Push Campaign
      type: object
      required:
        - request_id
        - updated_by
      properties:
        request_id:
          type: string
          description: A unique identifier for this campaign update request.
          example: push_update_12345
        updated_by:
          type: string
          format: email
          description: The email ID of the user updating this campaign.
          example: john.doe@example.com
        channel:
          type: string
          enum:
            - PUSH
          description: The communication channel (automatically set to PUSH for this tab).
        basic_details:
          $ref: '#/components/schemas/PushBasicDetails'
        trigger_condition:
          $ref: '#/components/schemas/PushTriggerCondition'
        campaign_content:
          $ref: '#/components/schemas/PushCampaignContent'
        segmentation_details:
          $ref: '#/components/schemas/SegmentationDetails'
        scheduling_details:
          $ref: '#/components/schemas/SchedulingDetails'
        delivery_controls:
          $ref: '#/components/schemas/PushDeliveryControls'
        advanced:
          $ref: '#/components/schemas/AdvancedDetails'
        conversion_goal_details:
          $ref: '#/components/schemas/ConversionGoalDetails'
        control_group_details:
          $ref: '#/components/schemas/ControlGroupDetails'
        utm_params:
          $ref: '#/components/schemas/UTMParams'
    EmailCampaignUpdateRequest:
      title: Email Campaign
      type: object
      required:
        - request_id
        - updated_by
      properties:
        request_id:
          type: string
          description: A unique identifier for this campaign update request.
          example: email_update_12345
        updated_by:
          type: string
          format: email
          description: The email ID of the user updating this campaign.
          example: john.doe@example.com
        channel:
          type: string
          enum:
            - EMAIL
          description: The communication channel (automatically set to EMAIL for this tab).
        basic_details:
          $ref: '#/components/schemas/EmailBasicDetails'
        trigger_condition:
          $ref: '#/components/schemas/EmailTriggerCondition'
        connector:
          $ref: '#/components/schemas/Connector'
        campaign_content:
          $ref: '#/components/schemas/EmailCampaignContent'
        segmentation_details:
          $ref: '#/components/schemas/SegmentationDetails'
        scheduling_details:
          $ref: '#/components/schemas/SchedulingDetails'
        delivery_controls:
          $ref: '#/components/schemas/EmailDeliveryControls'
        conversion_goal_details:
          $ref: '#/components/schemas/ConversionGoalDetails'
        control_group_details:
          $ref: '#/components/schemas/ControlGroupDetails'
        utm_params:
          $ref: '#/components/schemas/UTMParams'
    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.
    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](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.
          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'
    PushTriggerCondition:
      type: object
      description: |
        Trigger condition details for Push event-triggered campaigns.

        **Required** for EVENT_TRIGGERED campaigns.
      properties:
        included_filters:
          $ref: '#/components/schemas/FilterGroup'
        secondary_included_filters:
          $ref: '#/components/schemas/FilterGroup'
        trigger_delay_type:
          type: string
          enum:
            - DELAY
            - ASAP
            - INTELLIGENT_DELAY
          description: |
            The type of triggered delay.

            When set to DELAY, the following fields are mandatory:
            - trigger_delay_value
            - trigger_delay_granularity
            - trigger_relation
        trigger_delay_value:
          type: integer
          description: The numeric value of the triggered delay.
        trigger_delay_granularity:
          type: string
          enum:
            - MINUTES
            - HOURS
            - DAYS
          description: The time unit for the trigger delay.
        trigger_relation:
          type: string
          enum:
            - BEFORE
            - AFTER
          description: |
            The trigger relation with delay.

            **Required** when trigger_delay_type is DELAY.
        trigger_attr:
          type: object
          description: The attribute value of the trigger.
        intelligent_delay_optimization:
          type: object
          description: >
            Configuration for intelligent delay optimization.


            Used when trigger_delay_type is INTELLIGENT_DELAY. Defines a time
            window (min/max delay) within which the system finds the optimal
            moment to send the message.
          properties:
            min_delay_value:
              type: integer
              description: >-
                The numeric component of the lower bound for the intelligent
                delay window.
            min_delay_granularity:
              type: string
              enum:
                - MINUTES
                - HOURS
              description: The time unit that qualifies the min_delay_value.
            max_delay_value:
              type: integer
              description: >-
                The numeric component of the upper bound for the intelligent
                delay window.
            max_delay_granularity:
              type: string
              enum:
                - HOURS
                - DAYS
              description: The time unit that qualifies the max_delay_value.
    PushCampaignContent:
      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'
        content:
          type: object
          description: The actual Push campaign content.
          required:
            - push
          properties:
            push:
              $ref: '#/components/schemas/PushContent'
    SegmentationDetails:
      type: object
      description: Defines the target audience for the campaign.
      properties:
        included_filters:
          $ref: '#/components/schemas/FilterGroup'
        excluded_filters:
          $ref: '#/components/schemas/FilterGroup'
        is_all_user_campaign:
          type: boolean
          description: Whether to include all users in the campaign.
        send_campaign_to_opt_out_users:
          type: boolean
          description: Whether to send the campaign to users who have opted out.
    SchedulingDetails:
      type: object
      description: Defines when the campaign should be sent.
      required:
        - delivery_type
      properties:
        delivery_type:
          type: string
          enum:
            - ASAP
            - AT_FIXED_TIME
            - SEND_IN_BTS
            - SEND_IN_USER_TIMEZONE
          description: When to deliver the campaign.
        start_time:
          type: string
          format: date-time
          description: |
            The start time for the campaign in ISO 8601 format.

            Example: "2024-06-21T12:59:00"
        expiry_time:
          type: string
          format: date-time
          description: The expiry time for the campaign in ISO 8601 format.
        periodic_details:
          $ref: '#/components/schemas/PeriodicDetails'
        bts_details:
          $ref: '#/components/schemas/BTSDetails'
        user_timezone_details:
          $ref: '#/components/schemas/UserTimezoneDetails'
    PushDeliveryControls:
      type: object
      description: Controls for Push campaign delivery behavior.
      properties:
        bypass_dnd:
          type: boolean
          description: |
            Whether to bypass Do Not Disturb settings.

            Required for event-triggered campaigns.
        campaign_throttle_rpm:
          type: integer
          description: >
            The campaign throttle in requests per minute.


            Not applicable for device-triggered, location-triggered, and
            event-triggered campaigns.
          example: 50000
        count_for_frequency_capping:
          type: boolean
          description: Whether to count this campaign for frequency capping.
        ignore_frequency_capping:
          type: boolean
          description: Whether to ignore frequency capping for this campaign.
        minimum_delay_between_two_notification_in_hour:
          type: integer
          description: |
            Minimum delay between two notifications in hours.

            Applies to event-triggered and device-triggered campaigns.
        max_time_to_show_message_of_same_camapign:
          type: string
          description: >
            Maximum duration (in hours) that a message from this campaign will
            be displayed to a user.


            Applicable for device-triggered campaigns.
        expiry_time_of_sync_data_in_hour:
          type: string
          description: >
            Duration (in hours) after which synced campaign data will expire if
            trigger condition is not met.


            Applicable for device-triggered campaigns.
        send_message_in_offline_mode:
          type: boolean
          description: |
            Whether to store and deliver the message when the device is offline.

            Applicable for device-triggered campaigns.
        send_limit_value:
          type: string
          description: >
            Maximum number of times a user can receive this campaign within the
            specified time granularity.


            Applicable for location-triggered campaigns.
        send_limit_granularity_in_hours:
          type: string
          description: >
            Time window (in hours) during which the send_limit_value is
            enforced.


            Applicable for location-triggered campaigns.
    AdvancedDetails:
      type: object
      description: Advanced campaign settings.
      properties:
        expiration_settings:
          type: object
          properties:
            expire_notification_after_value:
              type: integer
              description: The numeric value for the notification expiration time.
            expire_notification_after_type:
              type: string
              enum:
                - HOUR
                - DAY
              description: The time unit for notification expiration.
            remove_from_inbox_after_value:
              type: integer
              description: The numeric value for when to remove the message from the inbox.
            remove_from_inbox_after_type:
              type: string
              enum:
                - DAY
              description: The time unit for removing the message from the inbox.
        platform_level_priority:
          type: object
          properties:
            android_specific_priority:
              type: object
              properties:
                send_with_priority:
                  type: boolean
                  description: Whether to send with priority.
            ios_specific_priority:
              type: object
              properties:
                apns_priority:
                  type: string
                  enum:
                    - '1'
                    - '5'
                    - '10'
                  description: The priority of notification delivery for APNS.
                interruption_level:
                  type: string
                  enum:
                    - Passive
                    - Active
                    - Time sensitive
                    - Critical
                  description: The interruption level for iOS notifications.
                relevance_score:
                  type: number
                  enum:
                    - 0
                    - 0.5
                    - 1
                  description: The relevance score for iOS notifications.
    ConversionGoalDetails:
      type: object
      description: Configuration for tracking campaign conversion goals.
      properties:
        attribution_window_in_hours:
          type: integer
          description: The attribution window in hours.
          example: 36
        goals:
          type: array
          items:
            $ref: '#/components/schemas/Goal'
          description: List of conversion goals to track.
    ControlGroupDetails:
      type: object
      description: Configuration for control groups.
      properties:
        is_campaign_control_group_enabled:
          type: boolean
          description: Whether the campaign control group is enabled.
        campaign_control_group_percentage:
          type: integer
          description: |
            The percentage of users added to the exclusion list.

            **Required** if is_campaign_control_group_enabled is true.
          minimum: 0
          maximum: 100
        is_global_control_group_enabled:
          type: boolean
          description: Whether the global control group is enabled.
    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).
    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](https://help.moengage.com/hc/en-us/articles/360028586211-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
    EmailTriggerCondition:
      type: object
      description: |
        Trigger condition details for Email event-triggered campaigns.

        **Required** for EVENT_TRIGGERED campaigns.
      properties:
        included_filters:
          $ref: '#/components/schemas/FilterGroup'
        secondary_included_filters:
          $ref: '#/components/schemas/FilterGroup'
        trigger_delay_type:
          type: string
          enum:
            - DELAY
            - ASAP
          description: |
            The type of triggered delay.

            When set to DELAY, the following fields are mandatory:
            - trigger_delay_value
            - trigger_delay_granularity
            - trigger_relation
        trigger_delay_value:
          type: integer
          description: The numeric value of the triggered delay.
        trigger_delay_granularity:
          type: string
          enum:
            - MINUTES
            - HOURS
            - DAYS
          description: The time unit for the trigger delay.
        trigger_relation:
          type: string
          enum:
            - BEFORE
            - AFTER
          description: |
            The trigger relation with delay.

            **Required** when trigger_delay_type is DELAY.
        trigger_attr:
          type: object
          description: The attribute value of the trigger.
    Connector:
      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
    EmailCampaignContent:
      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'
        content:
          type: object
          description: The actual Email campaign content.
          required:
            - email
          properties:
            email:
              $ref: '#/components/schemas/EmailContent'
    EmailDeliveryControls:
      type: object
      description: Controls for Email campaign delivery behavior.
      properties:
        bypass_dnd:
          type: boolean
          description: Whether to bypass Do Not Disturb settings.
        campaign_throttle_rpm:
          type: integer
          description: The campaign throttle in requests per minute.
          example: 50000
        count_for_frequency_capping:
          type: boolean
          description: Whether to count this campaign for frequency capping.
        ignore_frequency_capping:
          type: boolean
          description: Whether to ignore frequency capping for this campaign.
        minimum_delay_between_two_notification_in_hour:
          type: integer
          description: Minimum delay between two notifications in hours.
    Geofences:
      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).
    PlatformSpecificDetails:
      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.
    FilterGroup:
      type: object
      description: >
        A group of filters combined with a logical operator.


        For detailed segmentation payload and supported fields, refer to [Create
        Custom
        Segment](https://developers.moengage.com/hc/en-us/articles/13277936457748).
      required:
        - filter_operator
        - filters
      properties:
        filter_operator:
          type: string
          enum:
            - and
            - or
          description: The logical operator to combine filters.
        filters:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/UserAttributeFilter'
              - $ref: '#/components/schemas/ActionFilter'
              - $ref: '#/components/schemas/CustomSegmentFilter'
          description: |
            The list of filters to be combined using the filter operator.

            Supported filter types:
            - User attributes-based filters
            - Action-based filters (with or without attributes)
            - Custom segments
    VariationDetails:
      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.
    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'
    PeriodicDetails:
      type: object
      description: |
        Configuration for periodic campaigns.

        **Required** for PERIODIC campaigns.
      properties:
        sending_frequency:
          type: string
          enum:
            - DAILY
            - WEEKLY
            - MONTHLY
          description: The frequency to send the campaign.
        repeat_frequency:
          type: integer
          description: The repeat frequency of the campaign.
        no_of_occurences:
          type: integer
          description: The number of occurrences of the campaign.
        repeat_on_date_of_month:
          type: array
          items:
            type: integer
          description: |
            The dates of the month on which the campaign should be repeated.

            Example: [5, 25] to send on the 5th and 25th of each month.
        repeat_on_days_of_week:
          type: array
          items:
            type: string
            enum:
              - MONDAY
              - TUESDAY
              - WEDNESDAY
              - THURSDAY
              - FRIDAY
              - SATURDAY
              - SUNDAY
          description: The days of the week on which the campaign should repeat.
        repeat_on_days_of_week_for_month:
          type: array
          items:
            type: object
            properties:
              week_granularity:
                type: string
                enum:
                  - FIRST
                  - SECOND
                  - THIRD
                  - FOURTH
                  - LAST
              repeat_on_days_of_week:
                type: array
                items:
                  type: string
                  enum:
                    - MONDAY
                    - TUESDAY
                    - WEDNESDAY
                    - THURSDAY
                    - FRIDAY
                    - SATURDAY
                    - SUNDAY
          description: Configuration for repeating on specific weeks of the month.
    BTSDetails:
      type: object
      description: >
        Best Time to Send (BTS) configuration.


        BTS provides a prescriptive time slot to send a campaign to increase the
        chance of user interaction.
      properties:
        send_in_bts:
          type: boolean
          description: Whether to send the campaign at the best time.
        if_user_bts_is_not_available:
          type: string
          description: When to send the campaign if the user's best time is not available.
        if_user_bts_outside_time_window:
          type: string
          description: >-
            When to send the campaign if the user's best time is outside the
            time window.
        window_end_time:
          type: string
          description: The window end time.
          example: 6:43 am
    UserTimezoneDetails:
      type: object
      description: Configuration for sending in the user's timezone.
      properties:
        send_in_user_timezone:
          type: boolean
          description: >-
            Whether to send the campaign on a specific date and time within the
            user's timezone.
        send_if_user_timezone_has_passed:
          type: boolean
          description: Whether to send the campaign if the user's timezone has passed.
    Goal:
      type: object
      description: A single conversion goal configuration.
      properties:
        goal_name:
          type: string
          description: The name of the goal.
          example: Goal 1
        goal_event_name:
          type: string
          description: The event name associated with this goal.
        goal_event_attribute:
          type: object
          properties:
            name:
              type: string
              description: The name of the goal event attribute.
            condition:
              type: string
              description: The condition used while creating the goal.
            value:
              type: string
              description: The value of the goal event attribute.
            is_case_sensitive:
              type: boolean
              description: Whether the goal event attribute is case-sensitive.
        is_primary_goal:
          type: boolean
          description: Whether this is the primary goal.
        revenue_attribute:
          type: string
          description: The revenue attribute to track.
        revenue_currency:
          type: string
          description: The currency for revenue tracking.
    EmailContent:
      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: >-
            <!DOCTYPE html><html><head></head><body><p>Hello
            {{UserAttribute['First Name']}}</p></body></html>
        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.
    UserAttributeFilter:
      type: object
      description: Filter based on user attributes.
      required:
        - filter_type
        - data_type
        - name
        - operator
      properties:
        filter_type:
          type: string
          enum:
            - user_attributes
        data_type:
          type: string
          enum:
            - string
            - double
            - datetime
            - bool
          description: The data type of the attribute being filtered.
        category:
          type: string
          description: The category of the attribute (e.g., "Tracked Standard Attribute").
        name:
          type: string
          description: The name of the attribute to filter on (e.g., "uid").
        operator:
          type: string
          description: >
            The operator to use in the filter. Allowed values depend on
            data_type:

            - bool: is, exists

            - double: in, between, lessThan, greaterThan, exists

            - string: in, contains, containsInTheFollowing,
            startWithInTheFollowing, endsWithInTheFollowing, exists, is

            - datetime: inTheLast, on, between, before, after, inTheNext,
            exists, today
        value:
          description: The value to filter on (not required for 'exists' operator).
        case_sensitive:
          type: boolean
          description: Whether the filter comparison should be case-sensitive.
        negate:
          type: boolean
          description: Whether to negate the filter condition.
        project_name:
          type: string
          description: |
            The name of the project associated with the user attributes.

            **Required** if the Portfolio feature is enabled in your workspace.
    ActionFilter:
      type: object
      description: Filter based on user actions/events.
      required:
        - filter_type
        - action_name
      properties:
        filter_type:
          type: string
          enum:
            - actions
        action_name:
          type: string
          description: The name of the action/event to filter on.
        execution:
          type: object
          properties:
            type:
              type: string
              enum:
                - atleast
                - atmost
                - exactly
            count:
              type: integer
        executed:
          type: boolean
          description: Whether the action was executed.
        attributes:
          $ref: '#/components/schemas/FilterGroup'
        condition:
          type: string
          description: The condition type (e.g., "IF").
    CustomSegmentFilter:
      type: object
      description: Filter using a custom segment.
      required:
        - filter_type
        - id
      properties:
        filter_type:
          type: string
          enum:
            - custom_segments
        name:
          type: string
          description: The name of the custom segment.
        id:
          type: string
          description: The ID of the custom segment.
    AndroidPushContent:
      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'
        timer:
          $ref: '#/components/schemas/AndroidTimer'
        buttons:
          type: array
          description: Action buttons for the notification.
          items:
            $ref: '#/components/schemas/AndroidButton'
        advanced:
          $ref: '#/components/schemas/AndroidAdvanced'
        template_backup:
          $ref: '#/components/schemas/AndroidTemplateBackup'
    IOSPushContent:
      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'
        buttons:
          type: array
          description: Action buttons for the notification.
          items:
            $ref: '#/components/schemas/IOSButton'
        advanced:
          $ref: '#/components/schemas/IOSAdvanced'
        template_backup:
          $ref: '#/components/schemas/IOSTemplateBackup'
    WebPushContent:
      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'
        buttons:
          type: array
          description: Action buttons for the notification.
          items:
            $ref: '#/components/schemas/WebButton'
        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.
      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'
        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
      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'
    AndroidButton:
      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'
          description: Custom key-value pairs specific to this button's click event.
    AndroidAdvanced:
      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.
    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
      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'
          description: Custom key-value pairs specific to the fallback payload.
    IOSBasicDetails:
      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'
        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.
      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:
      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.
    IOSTemplateBackup:
      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'
          description: Custom key-value pairs specific to the fallback payload.
    WebBasicDetails:
      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.
    WebButton:
      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.
    WebAdvanced:
      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.
    CarouselContent:
      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'
    KeyValuePair:
      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.
    IOSCarouselContent:
      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'
  responses:
    NoContent:
      description: >
        Campaign updated successfully. The server successfully processed the
        request but is not returning any content.
    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'
    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: ''
    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: ''
  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**: Use your API Key, which you can find within the
        **Campaign report/Business events/Custom templates/Catalog API/Inform
        Report** tile.


        For more information on authentication and getting your credentials,
        refer
        [here](https://www.moengage.com/docs/api/introduction#getting-your-credentials).

````