---
title: "Update Campaign (V1 — Legacy)"
method: PATCH
path: "/campaigns/{campaign_id}"
tags: ["Update Campaigns"]
---

# Update Campaign (V1 — Legacy)

`PATCH /campaigns/{campaign_id}`

## Request

- Base URL: `https://api-01.moengage.com/core-services/v1`
- URL: `https://api-01.moengage.com/core-services/v1/campaigns/{campaign_id}`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/moengage/apis/moengage-campaigns-api/docs/campaigns/:campaign_id/patch.ts> (a function with typed inputs; its response is checked against the schema)

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.

## Path parameters

- `campaign_id` string, required

## Headers

- `MOE-APPKEY` string, required

## Request body

- union
  - PushCampaignUpdateRequest
    - `request_id` string, required: A unique identifier for this campaign update request.
    - `updated_by` string, email, required: The email ID of the user updating this campaign.
    - `channel` 'PUSH': The communication channel (automatically set to PUSH for this tab).
    - `basic_details` PushBasicDetails: Contains the basic information about the Push campaign.
      - `name` string, required: The name of the campaign.
      - `business_event` string: The business event to be mapped to the campaign. **Required** for BUSINESS_EVENT_TRIGGERED campaigns.
      - `tags` string[]: Tags that provide context about the campaign's nature or theme.
      - `team` string: The name of the team collaborating on this campaign. For more information, refer to [Teams in MoEngage](/user-guide/settings/account/team-management/teams-in-moengage).
      - `platforms` string[], required: The platforms to target for this Push campaign.
      - `broadcast_live_activity_id` string: The broadcast live activity ID for iOS Live Activities. **Required** when platform is iOS and delivery_type is BROADCAST_LIVE_ACTIVITY.
      - `geofences` Geofences: Geofence location details for location-triggered campaigns. **Required** for LOCATION_TRIGGERED campaigns.
        - `name` string, required: The unique name of the geofence location being targeted.
        - `latitude` string, required: The latitude coordinate for the center of the geofence area.
        - `longitude` string, required: The longitude coordinate for the center of the geofence area.
        - `radius` string, required: The radius in meters from the center point that defines the boundary of the geofence.
        - `dwell_time_value` string: 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` 'MINUTES' | 'HOURS' | 'DAYS': The time unit for the dwell_time_value. **Required** when triggered_at is set to "dwell".
        - `response_time_value` string, required: The numeric value for the time to wait before sending the message after the trigger condition is met.
        - `response_time_granularity` 'MINUTES' | 'HOURS' | 'DAYS', required: The time unit for the response_time_value.
        - `triggered_at` 'ENTRY' | 'EXIT' | 'dwell', required: The user action that triggers the campaign (when user enters/exits the geofence).
      - `send_to_triggered_platform_only` boolean: Whether to send the campaign only to the platform that triggered the event. Applicable for event-triggered campaigns.
      - `platform_specific_details` PlatformSpecificDetails, required: Platform-specific configuration details.
        - `android` object
          - `push_amp_plus_enabled` boolean: Whether Push Amp+ feature is enabled for this campaign.
        - `ios` object: **Note:** You must pass one of these keys as true for iOS.
          - `send_to_all_eligible_device` boolean: Whether to send the campaign to all eligible devices.
          - `exclude_provisional_push_devices` boolean: Whether to exclude provisional push devices.
          - `send_to_only_provisional_push_enabled_devices` boolean: Whether to send only to provisional push-enabled devices.
    - `trigger_condition` PushTriggerCondition: Trigger condition details for Push event-triggered campaigns. **Required** for EVENT_TRIGGERED campaigns.
      - `included_filters` FilterGroup: A group of filters combined with a logical operator. For detailed segmentation payload and supported fields, refer to [Create Custom Segment](/api/filter-segments/create-filter-segment).
        - `filter_operator` 'and' | 'or', required: The logical operator to combine filters.
        - `filters` union[], required: 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
          - union
            - UserAttributeFilter: Filter based on user attributes.
              - …
            - ActionFilter: Filter based on user actions/events.
              - …
            - CustomSegmentFilter: Filter using a custom segment.
              - …
      - `secondary_included_filters` FilterGroup: A group of filters combined with a logical operator. For detailed segmentation payload and supported fields, refer to [Create Custom Segment](/api/filter-segments/create-filter-segment).
        - `filter_operator` 'and' | 'or', required: The logical operator to combine filters.
        - `filters` union[], required: 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
          - union
            - UserAttributeFilter: Filter based on user attributes.
              - …
            - ActionFilter: Filter based on user actions/events.
              - …
            - CustomSegmentFilter: Filter using a custom segment.
              - …
      - `trigger_delay_type` 'DELAY' | 'ASAP' | 'INTELLIGENT_DELAY': 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` integer: The numeric value of the triggered delay.
      - `trigger_delay_granularity` 'MINUTES' | 'HOURS' | 'DAYS': The time unit for the trigger delay.
      - `trigger_relation` 'BEFORE' | 'AFTER': The trigger relation with delay. **Required** when trigger_delay_type is DELAY.
      - `trigger_attr` object: The attribute value of the trigger.
      - `intelligent_delay_optimization` object: 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.
        - `min_delay_value` integer: The numeric component of the lower bound for the intelligent delay window.
        - `min_delay_granularity` 'MINUTES' | 'HOURS': The time unit that qualifies the min_delay_value.
        - `max_delay_value` integer: The numeric component of the upper bound for the intelligent delay window.
        - `max_delay_granularity` 'HOURS' | 'DAYS': The time unit that qualifies the max_delay_value.
    - `campaign_content` PushCampaignContent: Contains the content and variations for the Push campaign.
      - `locales` string[]: List of locales for multi-language campaigns. You can send campaigns in multiple languages using locales.
      - `variation_details` VariationDetails: Configuration for A/B testing variations.
        - `distribution_type` 'SHERPA' | 'MANUAL', required: The distribution type for variations.
        - `no_of_variations` integer, required: The number of variations for the campaign.
        - `manual_distribution_percentage` object: Manual percentage distribution for each variation. **Required** when distribution_type is MANUAL.
        - `sherpa_campaign_duration` integer: The Sherpa campaign duration. **Required** when distribution_type is SHERPA.
        - `sherpa_distribution_metric` 'OPEN RATE' | 'CLICK RATE' | 'BOTH': The Sherpa distribution metric. **Required** when distribution_type is SHERPA.
      - `content` object, required: The actual Push campaign content.
        - `push` PushContent, required: Push notification content for Android, iOS, and Web platforms.
          - `android` AndroidPushContent: Android push notification content.
            - `template_type` 'BASIC' | 'STYLIZED_BASIC' | 'SIMPLE_IMAGE_CAROUSEL' | 'IMAGE_BANNER_WITH_TEXT' | 'TIMER' | 'TIMER_WITH_PROGRESS_BAR' | 'Custom', required: The type of Android push template. **Note:** If you are passing a template ID, set template_type to "Custom".
            - `custom_template_id` string: The ID of the custom template. **Required** when template_type is "Custom".
            - `custom_template_version` integer: The version of the custom template.
            - `basic_details` AndroidBasicDetails: Basic details for the Android push notification. Fields vary by template_type. All templates support common fields like title, message, default_click_action.
              - …
            - `timer` AndroidTimer: Timer configuration for Timer and Timer with Progress Bar templates. **Required for:** TIMER and TIMER_WITH_PROGRESS_BAR templates
              - …
            - `buttons` AndroidButton[]: Action buttons for the notification.
              - …
            - `advanced` AndroidAdvanced: Advanced configuration options for Android push notifications.
              - …
            - `template_backup` AndroidTemplateBackup: 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
              - …
          - `ios` IOSPushContent: iOS push notification content.
            - `template_type` 'BASIC' | 'STYLIZED_BASIC' | 'SIMPLE_IMAGE_CAROUSEL' | 'Custom', required: The type of iOS push template.
            - `custom_template_id` string: The ID of the custom template. **Required** when template_type is "Custom".
            - `custom_template_version` integer: The version of the custom template.
            - `basic_details` IOSBasicDetails: Basic details for the iOS push notification.
              - …
            - `buttons` IOSButton[]: Action buttons for the notification.
              - …
            - `advanced` IOSAdvanced: Advanced configuration options for iOS push notifications.
              - …
            - `template_backup` IOSTemplateBackup: Fallback notification content for when the template cannot be rendered. **Required for:** Stylized Basic and Simple Image Carousel templates
              - …
          - `web` WebPushContent: Web push notification content.
            - `template_type` 'BASIC', required: The template type for web push (currently only BASIC is supported).
            - `basic_details` WebBasicDetails, required: Basic details for the Web push notification.
              - …
            - `buttons` WebButton[]: Action buttons for the notification.
              - …
            - `advanced` WebAdvanced: Advanced configuration options for Web push notifications.
              - …
    - `segmentation_details` SegmentationDetails: Defines the target audience for the campaign.
      - `included_filters` FilterGroup: A group of filters combined with a logical operator. For detailed segmentation payload and supported fields, refer to [Create Custom Segment](/api/filter-segments/create-filter-segment).
        - `filter_operator` 'and' | 'or', required: The logical operator to combine filters.
        - `filters` union[], required: 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
          - union
            - UserAttributeFilter: Filter based on user attributes.
              - …
            - ActionFilter: Filter based on user actions/events.
              - …
            - CustomSegmentFilter: Filter using a custom segment.
              - …
      - `excluded_filters` FilterGroup: A group of filters combined with a logical operator. For detailed segmentation payload and supported fields, refer to [Create Custom Segment](/api/filter-segments/create-filter-segment).
        - `filter_operator` 'and' | 'or', required: The logical operator to combine filters.
        - `filters` union[], required: 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
          - union
            - UserAttributeFilter: Filter based on user attributes.
              - …
            - ActionFilter: Filter based on user actions/events.
              - …
            - CustomSegmentFilter: Filter using a custom segment.
              - …
      - `is_all_user_campaign` boolean: Whether to include all users in the campaign. **Note:** Targeting all users is not supported in this version of the Campaigns API. Omit this field or set it to `false`. If you pass `true`, the request fails with the following error: `Targeting all users is not allowed through the Campaigns API` To target all users, use the [Create Campaign (V5)](/api/create-campaigns/create-campaign-draft-v5) or [Update Campaign (V5)](/api/update-campaigns/update-campaign-v5) API, or create the campaign from the MoEngage dashboard.
      - `send_campaign_to_opt_out_users` boolean: Whether to send the campaign to users who have opted out.
    - `scheduling_details` SchedulingDetails: Defines when the campaign should be sent. All date-time values must be passed in UTC.
      - `delivery_type` 'ASAP' | 'AT_FIXED_TIME' | 'SEND_IN_BTS' | 'SEND_IN_USER_TIMEZONE', required: When to deliver the campaign.
      - `start_time` string, date-time: The start time for the campaign in ISO 8601 format. Pass this value in UTC. Example: "2024-06-21T12:59:00"
      - `expiry_time` string, date-time: The expiry time for the campaign in ISO 8601 format. Pass this value in UTC.
      - `periodic_details` PeriodicDetails: Configuration for periodic campaigns. **Required** for PERIODIC campaigns.
        - `sending_frequency` 'DAILY' | 'WEEKLY' | 'MONTHLY': The frequency to send the campaign.
        - `repeat_frequency` integer: The repeat frequency of the campaign.
        - `no_of_occurences` integer: The number of occurrences of the campaign.
        - `repeat_on_date_of_month` integer[]: 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` string[]: The days of the week on which the campaign should repeat.
        - `repeat_on_days_of_week_for_month` object[]: Configuration for repeating on specific weeks of the month.
          - `week_granularity` 'FIRST' | 'SECOND' | 'THIRD' | 'FOURTH' | 'LAST'
          - `repeat_on_days_of_week` string[]
      - `bts_details` BTSDetails: Best Time to Send (BTS) configuration. BTS provides a prescriptive time slot to send a campaign to increase the chance of user interaction.
        - `send_in_bts` boolean: Whether to send the campaign at the best time.
        - `if_user_bts_is_not_available` string: When to send the campaign if the user's best time is not available.
        - `if_user_bts_outside_time_window` string: When to send the campaign if the user's best time is outside the time window.
        - `window_end_time` string: The window end time.
      - `user_timezone_details` UserTimezoneDetails: Configuration for sending in the user's timezone.
        - `send_in_user_timezone` boolean: Whether to send the campaign on a specific date and time within the user's timezone.
        - `send_if_user_timezone_has_passed` boolean: Whether to send the campaign if the user's timezone has passed.
    - `delivery_controls` PushDeliveryControls: Controls for Push campaign delivery behavior.
      - `bypass_dnd` boolean: Whether to bypass Do Not Disturb settings. Required for event-triggered campaigns.
      - `campaign_throttle_rpm` integer: The campaign throttle in requests per minute. Not applicable for device-triggered, location-triggered, and event-triggered campaigns.
      - `count_for_frequency_capping` boolean: Whether to count this campaign for frequency capping.
      - `ignore_frequency_capping` boolean: Whether to ignore frequency capping for this campaign.
      - `minimum_delay_between_two_notification_in_hour` integer: Minimum delay between two notifications in hours. Applies to event-triggered and device-triggered campaigns.
      - `max_time_to_show_message_of_same_camapign` string: 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` string: 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` boolean: Whether to store and deliver the message when the device is offline. Applicable for device-triggered campaigns.
      - `send_limit_value` string: 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` string: Time window (in hours) during which the send_limit_value is enforced. Applicable for location-triggered campaigns.
    - `advanced` AdvancedDetails: Advanced campaign settings.
      - `expiration_settings` object
        - `expire_notification_after_value` integer: The numeric value for the notification expiration time.
        - `expire_notification_after_type` 'HOUR' | 'DAY': The time unit for notification expiration.
        - `remove_from_inbox_after_value` integer: The numeric value for when to remove the message from the inbox.
        - `remove_from_inbox_after_type` 'DAY': The time unit for removing the message from the inbox.
      - `platform_level_priority` object
        - `android_specific_priority` object
          - `send_with_priority` boolean: Whether to send with priority.
        - `ios_specific_priority` object
          - `apns_priority` '1' | '5' | '10': The priority of notification delivery for APNS.
          - `interruption_level` 'Passive' | 'Active' | 'Time sensitive' | 'Critical': The interruption level for iOS notifications.
          - `relevance_score` 0 | 0.5 | 1: The relevance score for iOS notifications.
    - `conversion_goal_details` ConversionGoalDetails: Configuration for tracking campaign conversion goals.
      - `attribution_window_in_hours` integer: The attribution window in hours.
      - `goals` Goal[]: List of conversion goals to track.
        - `goal_name` string: The name of the goal.
        - `goal_event_name` string: The event name associated with this goal.
        - `goal_event_attribute` GoalEventAttribute: Attributes associated with the conversion goal event.
          - `name` string: The name of the goal event attribute.
          - `condition` string: The condition used while creating the goal (e.g., "is", "contains", "between").
          - `data_type` 'STRING' | 'DOUBLE' | 'BOOL' | 'NUMBER' | 'GEOPOINT' | 'DATETIME' | 'ARRAY_DOUBLE' | 'ARRAY_STRING' | 'OBJECT' | 'ARRAY_OBJECT': The data type of the attribute.
          - `value` string: The value of the goal event attribute. Supported data types: STRING, DOUBLE, BOOL, NUMBER, GEOPOINT, DATETIME, ARRAY_DOUBLE, ARRAY_STRING.
          - `value1` string: A secondary value, used for conditions like 'between'. Supported data types: STRING, DOUBLE, BOOL, NUMBER, GEOPOINT, DATETIME, ARRAY_DOUBLE, ARRAY_STRING.
          - `negate` boolean: Whether to negate the filter condition.
          - `value_type` string: The type of value being filtered.
          - `array_filter_type` string: The logical filter type for array attributes.
          - `filters` object[]: A list of sub-filters used when data_type is OBJECT or ARRAY_OBJECT.
          - `is_case_sensitive` boolean: Whether the goal event attribute is case-sensitive.
        - `is_primary_goal` boolean: Whether this is the primary goal.
        - `revenue_attribute` string: The revenue attribute to track.
        - `revenue_currency` string: The currency for revenue tracking.
    - `control_group_details` ControlGroupDetails: Configuration for control groups.
      - `is_campaign_control_group_enabled` boolean: Whether the campaign control group is enabled.
      - `campaign_control_group_percentage` integer: The percentage of users added to the exclusion list. **Required** if is_campaign_control_group_enabled is true.
      - `is_global_control_group_enabled` boolean: Whether the global control group is enabled.
    - `utm_params` UTMParams: UTM parameters for tracking campaign performance.
      - `utm_source` string, required: The source of the traffic (e.g., YouTube, Instagram, Google). **Required** when using UTM parameters.
      - `utm_medium` string, required: The channel type (e.g., Push, SMS, Email). **Required** when using UTM parameters.
      - `utm_campaign` string: The name of the campaign (e.g., Newyear, Bigbillionday).
      - `utm_term` string: Search terms for paid traffic (e.g., Mobile+sale).
      - `utm_content` string: The content element that differentiates links (e.g., banner, video).
      - `utm_custom` string: Custom UTM parameter (maximum of 5 custom parameters).
  - EmailCampaignUpdateRequest
    - `request_id` string, required: A unique identifier for this campaign update request.
    - `updated_by` string, email, required: The email ID of the user updating this campaign.
    - `channel` 'EMAIL': The communication channel (automatically set to EMAIL for this tab).
    - `basic_details` EmailBasicDetails: Contains the basic information about the Email campaign.
      - `name` string, required: The name of the campaign.
      - `business_event` string: The business event to be mapped to the campaign. **Required** for BUSINESS_EVENT_TRIGGERED campaigns.
      - `content_type` 'PROMOTIONAL' | 'TRANSACTIONAL', required: The type of content in the campaign.
      - `subscription_category` string: 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.
      - `tags` string[]: Tags that provide context about the campaign's nature or theme.
      - `team` string: The name of the team collaborating on this campaign. For more information, refer to [Teams in MoEngage](/user-guide/settings/account/team-management/teams-in-moengage).
      - `user_attribute_identifier` string, required: The user attribute that stores the email address. Standard identifier is `MOE_EMAIL_ID`.
      - `send_only_double_opt_in_users` boolean: Whether to send the campaign only to users who have completed double opt-in. When `false` or omitted, the campaign sends to all eligible users. Ensure the Double Opt-In feature is enabled for your workspace.
      - `deduplication_attribute` string: The user attribute used for brand deduplication. Pass `""` (empty string) or omit the field to treat the campaign as single-brand. For multi-brand deduplication, pass the backend attribute name that stores the brand identifier (for example, `u_em`). Always use the backend attribute name (for example, `u_em`), not the display label (for example, `Email (Standard)`). Ensure the Brand Deduplication feature is enabled for your workspace.
    - `trigger_condition` EmailTriggerCondition: Trigger condition details for Email event-triggered campaigns. **Required** for EVENT_TRIGGERED campaigns.
      - `included_filters` FilterGroup: A group of filters combined with a logical operator. For detailed segmentation payload and supported fields, refer to [Create Custom Segment](/api/filter-segments/create-filter-segment).
        - `filter_operator` 'and' | 'or', required: The logical operator to combine filters.
        - `filters` union[], required: 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
          - union
            - UserAttributeFilter: Filter based on user attributes.
              - …
            - ActionFilter: Filter based on user actions/events.
              - …
            - CustomSegmentFilter: Filter using a custom segment.
              - …
      - `secondary_included_filters` FilterGroup: A group of filters combined with a logical operator. For detailed segmentation payload and supported fields, refer to [Create Custom Segment](/api/filter-segments/create-filter-segment).
        - `filter_operator` 'and' | 'or', required: The logical operator to combine filters.
        - `filters` union[], required: 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
          - union
            - UserAttributeFilter: Filter based on user attributes.
              - …
            - ActionFilter: Filter based on user actions/events.
              - …
            - CustomSegmentFilter: Filter using a custom segment.
              - …
      - `trigger_delay_type` 'DELAY' | 'ASAP': 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` integer: The numeric value of the triggered delay.
      - `trigger_delay_granularity` 'MINUTES' | 'HOURS' | 'DAYS': The time unit for the trigger delay.
      - `trigger_relation` 'BEFORE' | 'AFTER': The trigger relation with delay. **Required** when trigger_delay_type is DELAY.
      - `trigger_attr` object: The attribute value of the trigger.
    - `connector` Connector: Email connector configuration for sending email campaigns.
      - `connector_type` string, required: The type of connector service (e.g., SENDGRID, AWS SES, etc.).
      - `connector_name` string, required: The name of the connector configuration.
    - `campaign_content` EmailCampaignContent: Contains the content and variations for the Email campaign.
      - `locales` string[]: List of locales for multi-language campaigns. You can send campaigns in multiple languages using locales.
      - `variation_details` VariationDetails: Configuration for A/B testing variations.
        - `distribution_type` 'SHERPA' | 'MANUAL', required: The distribution type for variations.
        - `no_of_variations` integer, required: The number of variations for the campaign.
        - `manual_distribution_percentage` object: Manual percentage distribution for each variation. **Required** when distribution_type is MANUAL.
        - `sherpa_campaign_duration` integer: The Sherpa campaign duration. **Required** when distribution_type is SHERPA.
        - `sherpa_distribution_metric` 'OPEN RATE' | 'CLICK RATE' | 'BOTH': The Sherpa distribution metric. **Required** when distribution_type is SHERPA.
      - `content` object, required: The actual Email campaign content.
        - `email` EmailContent, required: Email campaign content.
          - `subject` string, required: The subject line of the email.
          - `preview_text` string: The preview text shown in email clients.
          - `sender_name` string, required: The name of the sender that appears in the email.
          - `from_address` string, email, required: The sender's email address.
          - `reply_to_address` string, email, required: The reply-to email address.
          - `cc_ids` string[]: Email addresses to CC.
          - `bcc_ids` string[]: Email addresses to BCC.
          - `html_content` string: The HTML content of the email. **Optional** if custom_template_id is provided.
          - `email_editor` 'Froala Editor' | 'Ace Editor': 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`.
          - `custom_template_id` string: 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` integer: The version of the custom template.
          - `attachments` object[]: Attachments to include in the email.
            - `file_type` 'URL' | 'PERSONALIZED_ATTACHMENT'
            - `url` string
            - `s3_keys` string[]: S3 object keys backing an attachment stored in S3.
          - `gmail_annotations` GmailAnnotations: Gmail Annotations shown in Gmail's Promotions tab. Two annotation types are supported: `deal_card` and `product_carousel`. These are mutually exclusive — include only one per campaign. **Note:** `gmail_annotations` is only supported when `content_type` is `PROMOTIONAL`. Using it with `TRANSACTIONAL` returns a `400` error.
            - `send_email_if_personalization_fails` boolean, required: Whether to send the email if personalization of any Gmail annotation field fails. **Required** when `gmail_annotations` is present.
            - `sender_logo` string, required: The sender logo shown in the Gmail annotation. Accepts a valid HTTPS URL or a MoEngage personalization token. **Required** when `gmail_annotations` is present.
            - `sender_logo_type` 'image_url' | 'uploaded_image', required: The source type of the sender logo. **Required** when `sender_logo` is provided.
            - `deal_card` GmailAnnotationsDealCard: Deal Card annotation shown in Gmail's Promotions tab. All four fields below are required when `deal_card` is present.
              - …
            - `product_carousel` GmailAnnotationsProductCarousel: Product Carousel annotation shown in Gmail's Promotions tab. Use `MANUAL` to specify products directly in the request, or `PRODUCT_SET` to pull products dynamically from a MoEngage Catalog product set.
              - …
    - `segmentation_details` SegmentationDetails: Defines the target audience for the campaign.
      - `included_filters` FilterGroup: A group of filters combined with a logical operator. For detailed segmentation payload and supported fields, refer to [Create Custom Segment](/api/filter-segments/create-filter-segment).
        - `filter_operator` 'and' | 'or', required: The logical operator to combine filters.
        - `filters` union[], required: 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
          - union
            - UserAttributeFilter: Filter based on user attributes.
              - …
            - ActionFilter: Filter based on user actions/events.
              - …
            - CustomSegmentFilter: Filter using a custom segment.
              - …
      - `excluded_filters` FilterGroup: A group of filters combined with a logical operator. For detailed segmentation payload and supported fields, refer to [Create Custom Segment](/api/filter-segments/create-filter-segment).
        - `filter_operator` 'and' | 'or', required: The logical operator to combine filters.
        - `filters` union[], required: 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
          - union
            - UserAttributeFilter: Filter based on user attributes.
              - …
            - ActionFilter: Filter based on user actions/events.
              - …
            - CustomSegmentFilter: Filter using a custom segment.
              - …
      - `is_all_user_campaign` boolean: Whether to include all users in the campaign. **Note:** Targeting all users is not supported in this version of the Campaigns API. Omit this field or set it to `false`. If you pass `true`, the request fails with the following error: `Targeting all users is not allowed through the Campaigns API` To target all users, use the [Create Campaign (V5)](/api/create-campaigns/create-campaign-draft-v5) or [Update Campaign (V5)](/api/update-campaigns/update-campaign-v5) API, or create the campaign from the MoEngage dashboard.
      - `send_campaign_to_opt_out_users` boolean: Whether to send the campaign to users who have opted out.
    - `scheduling_details` SchedulingDetails: Defines when the campaign should be sent. All date-time values must be passed in UTC.
      - `delivery_type` 'ASAP' | 'AT_FIXED_TIME' | 'SEND_IN_BTS' | 'SEND_IN_USER_TIMEZONE', required: When to deliver the campaign.
      - `start_time` string, date-time: The start time for the campaign in ISO 8601 format. Pass this value in UTC. Example: "2024-06-21T12:59:00"
      - `expiry_time` string, date-time: The expiry time for the campaign in ISO 8601 format. Pass this value in UTC.
      - `periodic_details` PeriodicDetails: Configuration for periodic campaigns. **Required** for PERIODIC campaigns.
        - `sending_frequency` 'DAILY' | 'WEEKLY' | 'MONTHLY': The frequency to send the campaign.
        - `repeat_frequency` integer: The repeat frequency of the campaign.
        - `no_of_occurences` integer: The number of occurrences of the campaign.
        - `repeat_on_date_of_month` integer[]: 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` string[]: The days of the week on which the campaign should repeat.
        - `repeat_on_days_of_week_for_month` object[]: Configuration for repeating on specific weeks of the month.
          - `week_granularity` 'FIRST' | 'SECOND' | 'THIRD' | 'FOURTH' | 'LAST'
          - `repeat_on_days_of_week` string[]
      - `bts_details` BTSDetails: Best Time to Send (BTS) configuration. BTS provides a prescriptive time slot to send a campaign to increase the chance of user interaction.
        - `send_in_bts` boolean: Whether to send the campaign at the best time.
        - `if_user_bts_is_not_available` string: When to send the campaign if the user's best time is not available.
        - `if_user_bts_outside_time_window` string: When to send the campaign if the user's best time is outside the time window.
        - `window_end_time` string: The window end time.
      - `user_timezone_details` UserTimezoneDetails: Configuration for sending in the user's timezone.
        - `send_in_user_timezone` boolean: Whether to send the campaign on a specific date and time within the user's timezone.
        - `send_if_user_timezone_has_passed` boolean: Whether to send the campaign if the user's timezone has passed.
    - `delivery_controls` EmailDeliveryControls: Controls for Email campaign delivery behavior.
      - `bypass_dnd` boolean: Whether to bypass Do Not Disturb settings.
      - `campaign_throttle_rpm` integer: The campaign throttle in requests per minute.
      - `count_for_frequency_capping` boolean: Whether to count this campaign for frequency capping.
      - `ignore_frequency_capping` boolean: Whether to ignore frequency capping for this campaign.
      - `minimum_delay_between_two_notification_in_hour` integer: Minimum delay between two notifications in hours.
    - `conversion_goal_details` ConversionGoalDetails: Configuration for tracking campaign conversion goals.
      - `attribution_window_in_hours` integer: The attribution window in hours.
      - `goals` Goal[]: List of conversion goals to track.
        - `goal_name` string: The name of the goal.
        - `goal_event_name` string: The event name associated with this goal.
        - `goal_event_attribute` GoalEventAttribute: Attributes associated with the conversion goal event.
          - `name` string: The name of the goal event attribute.
          - `condition` string: The condition used while creating the goal (e.g., "is", "contains", "between").
          - `data_type` 'STRING' | 'DOUBLE' | 'BOOL' | 'NUMBER' | 'GEOPOINT' | 'DATETIME' | 'ARRAY_DOUBLE' | 'ARRAY_STRING' | 'OBJECT' | 'ARRAY_OBJECT': The data type of the attribute.
          - `value` string: The value of the goal event attribute. Supported data types: STRING, DOUBLE, BOOL, NUMBER, GEOPOINT, DATETIME, ARRAY_DOUBLE, ARRAY_STRING.
          - `value1` string: A secondary value, used for conditions like 'between'. Supported data types: STRING, DOUBLE, BOOL, NUMBER, GEOPOINT, DATETIME, ARRAY_DOUBLE, ARRAY_STRING.
          - `negate` boolean: Whether to negate the filter condition.
          - `value_type` string: The type of value being filtered.
          - `array_filter_type` string: The logical filter type for array attributes.
          - `filters` object[]: A list of sub-filters used when data_type is OBJECT or ARRAY_OBJECT.
          - `is_case_sensitive` boolean: Whether the goal event attribute is case-sensitive.
        - `is_primary_goal` boolean: Whether this is the primary goal.
        - `revenue_attribute` string: The revenue attribute to track.
        - `revenue_currency` string: The currency for revenue tracking.
    - `control_group_details` ControlGroupDetails: Configuration for control groups.
      - `is_campaign_control_group_enabled` boolean: Whether the campaign control group is enabled.
      - `campaign_control_group_percentage` integer: The percentage of users added to the exclusion list. **Required** if is_campaign_control_group_enabled is true.
      - `is_global_control_group_enabled` boolean: Whether the global control group is enabled.
    - `utm_params` UTMParams: UTM parameters for tracking campaign performance.
      - `utm_source` string, required: The source of the traffic (e.g., YouTube, Instagram, Google). **Required** when using UTM parameters.
      - `utm_medium` string, required: The channel type (e.g., Push, SMS, Email). **Required** when using UTM parameters.
      - `utm_campaign` string: The name of the campaign (e.g., Newyear, Bigbillionday).
      - `utm_term` string: Search terms for paid traffic (e.g., Mobile+sale).
      - `utm_content` string: The content element that differentiates links (e.g., banner, video).
      - `utm_custom` string: Custom UTM parameter (maximum of 5 custom parameters).
    - `campaign_audience_limit` CampaignAudienceLimit: Configuration for limiting campaign audience.
      - `limit` integer: The maximum number of times an audience can be included or targeted within the campaign.
      - `metrics` string: The type of measurement being tracked (e.g., impressions, clicks, conversions).
      - `frequency` string: How often the limit and metrics are applied (e.g., daily, weekly, monthly).

## Response `204`

Campaign updated successfully. The server successfully processed the request but is not returning any content.

## Other responses

- `400`: Bad Request - Missing or invalid parameters
- `401`: Authentication Failure - Invalid or missing authentication credentials
- `500`: Internal Server Error - Unexpected system error

---

[API](https://skmtc.dev/moengage/apis/moengage-campaigns-api.md) - [All operations](https://skmtc.dev/moengage/apis/moengage-campaigns-api/llms.txt) - [OpenAPI document](https://skmtc.dev/moengage/apis/moengage-campaigns-api/revisions/7fc8a931584f?raw)
