Create a campaign
Create a campaign. For a supported messaging inbox, provide scheduled_at to schedule a one-off campaign; omitting it makes the campaign eligible for the next scheduler run. Website campaigns use trigger_rules instead. Channel-specific campaign availability and requirements still apply. One-off campaigns require at least one audience label for delivery. WhatsApp campaigns also require template_params with the selected template name, language, and any variable values. A successful creation response does not confirm delivery. Requires an account administrator and API access enabled for the account.
AuthorizationBearer <token>Authenticate with Authorization: Bearer <token> using a user API token from Profile Settings. Available in Chatwoot v4.19.0 and later.
account_id*integerThe numeric ID of the account
application/json- body
campaign*||Success
application/json- response
id?integerAccount-scoped campaign ID. Use this value in campaign API paths.
title?stringdescription?string|nullaccount_id?integerinbox?sender?Sender details, or an empty object when no sender is assigned.
message?stringtemplate_params?|nullcampaign_status?string"active""processing""completed"campaign_type?stringDerived from the inbox type; website campaigns are ongoing and supported messaging campaigns are one-off.
"ongoing""one_off"enabled?booleanscheduled_at?integerScheduled time in Unix seconds. Only present for one-off campaigns.
started_at?|Start time in Unix seconds. Only present for one-off campaigns.
completed_at?|Completion time in Unix seconds. Only present for one-off campaigns.
audience?array<>|Audience for a one-off campaign. Only present for one-off campaigns.
trigger_rules?trigger_only_during_business_hours?booleancreated_at?stringdate-timeupdated_at?stringdate-timecurl -X POST 'https://helpdesk.inclamo.com/api/v1/accounts/0/campaigns' \ -H 'Content-Type: application/json' \ -d '{ "campaign": { "title": "January announcement", "inbox_id": 12, "message": "Our January offers are here!", "scheduled_at": "2027-01-15T10:00:00Z", "audience": [ { "type": "Label", "id": 5 } ] }}'{ "id": 0, "title": "string", "description": "string", "account_id": 0, "inbox": { "id": 0, "name": "string", "website_url": "string", "page_id": "string", "instagram_id": "string", "business_id": "string", "provider_name": "string", "profile_id": "string", "line_channel_id": "string", "email": "string", "bot_name": "string", "inbox_identifier": "string", "channel_type": "string", "avatar_url": "string", "widget_color": "string", "website_token": "string", "enable_auto_assignment": true, "web_widget_script": "string", "welcome_title": "string", "welcome_tagline": "string", "greeting_enabled": true, "greeting_message": "string", "channel_id": 0, "working_hours_enabled": true, "enable_email_collect": true, "csat_survey_enabled": true, "auto_assignment_config": {}, "out_of_office_message": "string", "working_hours": [ { "day_of_week": 0, "closed_all_day": true, "open_hour": 0, "open_minutes": 0, "close_hour": 0, "close_minutes": 0, "open_all_day": true } ], "timezone": "string", "callback_webhook_url": "string", "allow_messages_after_resolved": true, "lock_to_single_conversation": true, "sender_name_type": "string", "business_name": "string", "branded_email_layout": "string", "hmac_mandatory": true, "selected_feature_flags": [ "string" ], "reply_time": "string", "messaging_service_sid": "string", "phone_number": "string", "medium": "string", "provider": "string" }, "sender": {}, "message": "string", "template_params": {}, "campaign_status": "active", "campaign_type": "ongoing", "enabled": true, "scheduled_at": 0, "started_at": 0, "completed_at": 0, "audience": [ { "type": "string", "id": 0 } ], "trigger_rules": {}, "trigger_only_during_business_hours": true, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}