update_campaign
Update an existing campaign by modifying its content, scheduling, or targeting, with automatic validation of status-based restrictions.
Instructions
Update an existing campaign using PATCH semantics — only provided fields are sent.
All flat params are optional. Only sub-objects where at least one param is set are included in the PATCH payload. Dict overrides replace auto-built sub-objects.
PATCH semantics: When providing a dict override like campaign_content, include ALL fields you want to keep — the API replaces the entire sub-object, not deep merge.
Status restrictions (validated locally before API call):
STOPPED / ARCHIVED: All updates rejected.
ACTIVE: trigger_condition, segmentation_details, conversion_goal_details, scheduling_details.delivery_type, scheduling_details.start_time blocked.
SCHEDULED: scheduling_details.delivery_type blocked.
--- REQUIRED --- campaign_id: Campaign to update. updated_by: Updater email address (must contain @). channel: EMAIL or PUSH.
--- STATUS CONTEXT --- campaign_status: Current status — drives restriction validation. campaign_delivery_type: e.g. EVENT_TRIGGERED — drives cache_warning.
--- EMAIL CONTENT (sends campaign_content when any email param set) --- subject: Email subject line. sender_name: Display name for sender. from_address: Sending email address. reply_to_address: Reply-to address. html_content: Raw HTML body (mutually exclusive with template_id). template_id: Saved template ID (mutually exclusive with html_content). preview_text: Email preheader text. cc_ids: CC email addresses list. bcc_ids: BCC email addresses list. custom_template_version: Template version number override. attachments: List of attachment dicts.
--- PUSH CONTENT (sends campaign_content when any push param set) --- platforms: Target platforms list — ANDROID, IOS, WEB (required for push content). push_title: Notification title (required for push content). push_message: Notification body (required for push content). android_notification_channel: Android channel ID (default: "default"). android_default_click_action: Click action type (default: "DEEPLINKING"). android_default_click_action_value: Deep link URL. android_image_url: Android notification image URL. android_input_gif_url: Android notification GIF URL. android_key_value_pairs: Custom key-value pairs. android_buttons: Android push action buttons list. android_advanced: Android advanced options dict. android_push_content_override: Replaces auto-built Android content block. android_summary: Android notification summary text. android_push_amp_plus_enabled: Enable Push Amplification Plus. android_template_type: BASIC, STYLIZED_BASIC, SIMPLE_IMAGE_CAROUSEL, IMAGE_BANNER_WITH_TEXT, TIMER, TIMER_WITH_PROGRESS_BAR, or Custom. android_custom_template_id: Custom template ID. android_custom_template_version: Custom template version. android_timer: Timer config dict. android_template_backup: Fallback template dict. android_carousel_content: Carousel content dict. android_background_color_code: Hex color for notification background. android_app_name_color_code: Hex color for app name text. android_notification_control_color: LIGHT or DARK. android_include_app_name_and_time: Show app name and time. android_include_title_and_message: Show title and message. android_apply_background_color_in_text_editor: Apply bg color in editor. android_image_scaling: FIT_INSIDE_IMAGE_CONTAINER or FILL_IMAGE_CONTAINER. android_banner_image_url: Banner image URL. android_collapsed_push_notification: Collapsed push style. ios_title: iOS title (falls back to push_title). ios_message: iOS message (falls back to push_message). ios_default_click_action: iOS click action type. ios_default_click_action_value: iOS click action URL. ios_subtitle: iOS notification subtitle. ios_allow_bg_refresh: Allow background refresh. ios_rich_media_type: IMAGE, VIDEO, AUDIO, or GIF. ios_rich_media_value: Rich media URL value. ios_image_url: iOS notification image URL. ios_input_gif_url: iOS notification GIF URL. ios_key_value_pairs: Custom key-value pairs for iOS. ios_background_color_code: Hex color for notification background. ios_apply_background_color_in_text_editor: Apply bg color in editor. ios_template_type: BASIC, STYLIZED_BASIC, SIMPLE_IMAGE_CAROUSEL, or Custom. ios_custom_template_id: Custom template ID. ios_custom_template_version: Custom template version. ios_template_backup: Fallback template dict. ios_carousel_content: Carousel content dict. ios_send_to_all_eligible_device: Send to all eligible iOS devices. ios_exclude_provisional: Exclude provisional push devices. ios_send_to_only_provisional: Send only to provisional. ios_buttons: iOS push action buttons list. ios_advanced: iOS advanced options dict. ios_push_content_override: Replaces auto-built iOS content block. web_redirect_url: Web push redirect URL. web_image_url: Web push notification image URL. web_auto_dismiss_notification: Auto-dismiss web notification. web_buttons: Web push action buttons list. web_advanced: Web advanced options dict. web_icon_image_type: DEFAULT or ICON_URL. web_icon_url: Custom icon URL for web push. web_push_content_override: Replaces auto-built Web content block.
--- BASIC DETAILS (sends basic_details when any param set) --- campaign_name: New campaign name. content_type: PROMOTIONAL or TRANSACTIONAL (EMAIL only). subscription_category: Subscription category (EMAIL PROMOTIONAL only). tags: Campaign tags list (replaces existing tags). team: Team name. business_event: Business event name. send_to_triggered_platform_only: Send only to triggering platform (PUSH). broadcast_live_activity_id: Live Activity broadcast ID (PUSH iOS). geofences: Geofence config dict (PUSH LOCATION_TRIGGERED).
--- SCHEDULING (sends scheduling_details when any param set) --- scheduling_delivery_type: AT_FIXED_TIME, ASAP, SEND_IN_BTS, SEND_IN_USER_TIMEZONE. start_time: ISO 8601 start datetime. Blocked for ACTIVE campaigns. end_time: ISO 8601 expiry datetime. periodic_details: Periodic scheduling config dict. bts_details: Best-time-to-send config dict. user_timezone_details: User timezone config dict.
--- CONNECTOR --- connector_type: Email service provider. connector_name: Connector config name.
--- SEGMENTATION SHORTCUTS --- is_all_user_campaign: Target all users. custom_segment_id: Target a specific segment.
--- UTM --- utm_source, utm_medium, utm_campaign, utm_term, utm_content, utm_custom.
--- DICT OVERRIDES --- basic_details: Full basic_details dict. campaign_content: Full campaign_content dict. scheduling_details: Full scheduling_details dict. segmentation_details: Full segmentation_details dict. Blocked for ACTIVE. connector: Full connector dict. trigger_condition: Full trigger_condition dict. Blocked for ACTIVE. delivery_controls: Full delivery_controls dict. conversion_goal_details: Full conversion_goal_details dict. Blocked for ACTIVE. control_group_details: Full control_group_details dict. utm_params: Full UTM params dict. advanced: Full advanced dict (PUSH only). locales: Locale configuration for A/B testing. variation_details: Variation metadata for A/B testing.
Rate limit: 5/min, 25/hr, 100/day.
Returns: {success: true, campaign_id, dashboard_url} on success. (+ cache_warning if EVENT_TRIGGERED with content changes) {success: false, error, campaign_id} on status restriction. {success: false, error, status_code, api_response} on API error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| campaign_id | Yes | ||
| updated_by | Yes | ||
| channel | Yes | ||
| campaign_status | No | ||
| campaign_delivery_type | No | ||
| subject | No | ||
| sender_name | No | ||
| from_address | No | ||
| reply_to_address | No | ||
| html_content | No | ||
| template_id | No | ||
| preview_text | No | ||
| cc_ids | No | ||
| bcc_ids | No | ||
| custom_template_version | No | ||
| attachments | No | ||
| platforms | No | ||
| push_title | No | ||
| push_message | No | ||
| android_notification_channel | No | ||
| android_default_click_action | No | ||
| android_default_click_action_value | No | ||
| android_image_url | No | ||
| android_input_gif_url | No | ||
| android_key_value_pairs | No | ||
| android_buttons | No | ||
| android_advanced | No | ||
| android_push_content_override | No | ||
| android_summary | No | ||
| android_push_amp_plus_enabled | No | ||
| android_template_type | No | ||
| android_custom_template_id | No | ||
| android_custom_template_version | No | ||
| android_timer | No | ||
| android_template_backup | No | ||
| android_carousel_content | No | ||
| android_background_color_code | No | ||
| android_app_name_color_code | No | ||
| android_notification_control_color | No | ||
| android_include_app_name_and_time | No | ||
| android_include_title_and_message | No | ||
| android_apply_background_color_in_text_editor | No | ||
| android_image_scaling | No | ||
| android_banner_image_url | No | ||
| android_collapsed_push_notification | No | ||
| ios_title | No | ||
| ios_message | No | ||
| ios_default_click_action | No | ||
| ios_default_click_action_value | No | ||
| ios_subtitle | No | ||
| ios_allow_bg_refresh | No | ||
| ios_rich_media_type | No | ||
| ios_rich_media_value | No | ||
| ios_image_url | No | ||
| ios_input_gif_url | No | ||
| ios_key_value_pairs | No | ||
| ios_background_color_code | No | ||
| ios_apply_background_color_in_text_editor | No | ||
| ios_template_type | No | ||
| ios_custom_template_id | No | ||
| ios_custom_template_version | No | ||
| ios_template_backup | No | ||
| ios_carousel_content | No | ||
| ios_send_to_all_eligible_device | No | ||
| ios_exclude_provisional | No | ||
| ios_send_to_only_provisional | No | ||
| ios_buttons | No | ||
| ios_advanced | No | ||
| ios_push_content_override | No | ||
| web_redirect_url | No | ||
| web_image_url | No | ||
| web_auto_dismiss_notification | No | ||
| web_buttons | No | ||
| web_advanced | No | ||
| web_icon_image_type | No | ||
| web_icon_url | No | ||
| web_push_content_override | No | ||
| campaign_name | No | ||
| content_type | No | ||
| subscription_category | No | ||
| tags | No | ||
| team | No | ||
| business_event | No | ||
| send_to_triggered_platform_only | No | ||
| broadcast_live_activity_id | No | ||
| geofences | No | ||
| scheduling_delivery_type | No | ||
| start_time | No | ||
| end_time | No | ||
| periodic_details | No | ||
| bts_details | No | ||
| user_timezone_details | No | ||
| connector_type | No | ||
| connector_name | No | ||
| is_all_user_campaign | No | ||
| custom_segment_id | No | ||
| utm_source | No | ||
| utm_medium | No | ||
| utm_campaign | No | ||
| utm_term | No | ||
| utm_content | No | ||
| utm_custom | No | ||
| basic_details | No | ||
| campaign_content | No | ||
| scheduling_details | No | ||
| segmentation_details | No | ||
| connector | No | ||
| trigger_condition | No | ||
| delivery_controls | No | ||
| conversion_goal_details | No | ||
| control_group_details | No | ||
| utm_params | No | ||
| advanced | No | ||
| locales | No | ||
| variation_details | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||