create_campaign
Create email or push campaigns in MoEngage with customizable content, scheduling, and targeting options.
Instructions
Create an Email or Push campaign in MoEngage.
Uses flat scalar params by default. Dict overrides replace auto-built sub-objects.
--- REQUIRED --- channel: EMAIL or PUSH. campaign_delivery_type: ONE_TIME, PERIODIC, EVENT_TRIGGERED, BUSINESS_EVENT_TRIGGERED, DEVICE_TRIGGERED (Push only), LOCATION_TRIGGERED (Push only), BROADCAST_LIVE_ACTIVITY (Push only). created_by: Creator email address (must contain @). campaign_name: Campaign display name.
--- EMAIL CONTENT (required for EMAIL unless campaign_content override) --- subject: Email subject line (required unless template_id provided). sender_name: Display name for sender (defaults to campaign_name). from_address: Sending email address (required). reply_to_address: Reply-to address (defaults to from_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 shown in inbox previews. 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 (required for PUSH unless campaign_content override) --- platforms: Target platforms list — ANDROID, IOS, WEB (required). push_title: Notification title (required). push_message: Notification body (required). 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 for DEEPLINKING. android_image_url: Android notification image URL. android_input_gif_url: Android notification GIF URL. android_key_value_pairs: Custom key-value pairs for Android. android_buttons: Android push action buttons list. android_advanced: Android advanced options dict. android_push_content_override: Replaces auto-built Android content block entirely. android_summary: Android notification summary text. android_push_amp_plus_enabled: Enable Push Amplification Plus (default: False). android_template_type: BASIC, STYLIZED_BASIC, SIMPLE_IMAGE_CAROUSEL, IMAGE_BANNER_WITH_TEXT, TIMER, TIMER_WITH_PROGRESS_BAR, or Custom (default: "BASIC"). android_custom_template_id: Custom template ID (with Custom template_type). android_custom_template_version: Custom template version. android_timer: Timer config dict for countdown notifications. android_template_backup: Fallback template dict for custom templates. 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 control color. 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 text editor. android_image_scaling: FIT_INSIDE_IMAGE_CONTAINER or FILL_IMAGE_CONTAINER. android_banner_image_url: Banner image URL (IMAGE_BANNER_WITH_TEXT). android_collapsed_push_notification: Collapsed push style. ios_title: iOS title (falls back to push_title). ios_message: iOS message body (falls back to push_message). ios_default_click_action: iOS click action type. ios_default_click_action_value: iOS click action URL/value. ios_subtitle: iOS notification subtitle. ios_allow_bg_refresh: Allow background refresh for iOS push. 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 text 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 (default True). ios_exclude_provisional: Exclude provisional push devices. ios_send_to_only_provisional: Send only to provisional push devices. ios_buttons: iOS push action buttons list. ios_advanced: iOS advanced options dict. ios_push_content_override: Replaces auto-built iOS content block entirely. web_redirect_url: Web push redirect URL (required for WEB platform). 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 entirely.
--- BASIC DETAILS --- content_type: PROMOTIONAL or TRANSACTIONAL (EMAIL only, default: PROMOTIONAL). subscription_category: Subscription list category (EMAIL PROMOTIONAL only). tags: Campaign tags list. team: Team name. business_event: Business event name. send_to_triggered_platform_only: Send only to triggering platform (PUSH only). broadcast_live_activity_id: Live Activity broadcast ID (PUSH iOS only). geofences: Geofence config dict (PUSH LOCATION_TRIGGERED only).
--- SCHEDULING --- scheduling_delivery_type: AT_FIXED_TIME, ASAP, SEND_IN_BTS, or SEND_IN_USER_TIMEZONE. start_time: ISO 8601 start datetime. end_time: ISO 8601 expiry datetime. periodic_details: Periodic scheduling config dict (PERIODIC campaigns). bts_details: Best-time-to-send config dict (SEND_IN_BTS). user_timezone_details: User timezone config dict (SEND_IN_USER_TIMEZONE).
--- CONNECTOR (EMAIL only, defaults to AMAZON_SES/default) --- connector_type: Email service provider (default: "AMAZON_SES"). connector_name: Connector config name (default: "default").
--- SEGMENTATION SHORTCUTS (defaults to all users) --- is_all_user_campaign: Target all users (default: True). custom_segment_id: Target a specific segment (sets is_all_user_campaign=False).
--- UTM --- utm_source: UTM source parameter. utm_medium: UTM medium parameter. utm_campaign: UTM campaign parameter. utm_term: UTM term parameter. utm_content: UTM content parameter. utm_custom: UTM custom parameter.
--- DICT OVERRIDES (replace auto-built sub-objects when provided) --- basic_details: Full basic_details dict. Flat scalars merged as defaults. campaign_content: Full campaign_content dict. Replaces all content flat params. scheduling_details: Full scheduling_details dict. Flat scheduling scalars merged. segmentation_details: Full segmentation_details dict. connector: Full connector dict. trigger_condition: Trigger config (required for EVENT_TRIGGERED). delivery_controls: Delivery controls dict. conversion_goal_details: Conversion goal config dict. control_group_details: Control group config dict. utm_params: Full UTM params dict. Replaces utm_* flat params. advanced: Advanced push options dict (PUSH only). campaign_audience_limit: Audience limit config (EMAIL only). locales: Locale configuration for A/B testing. variation_details: Variation metadata for A/B testing.
Rate limit: 5 campaigns/min, 25/hr, 100/day.
Returns: {success: true, campaign_id, dashboard_url} on success. {success: false, error} on validation error. {success: false, error, status_code, api_response} on API error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel | Yes | ||
| campaign_delivery_type | Yes | ||
| created_by | Yes | ||
| campaign_name | 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 | ||
| 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 | ||
| campaign_audience_limit | No | ||
| locales | No | ||
| variation_details | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||