Skip to main content
POST
Create a campaign

Authorizations

Authorization
string
header
required

The id_token from POST /auth/v1/signin, sent as Authorization: Bearer <id_token>. Not the access_token — that one does not carry the identity Cloud Chat authorizes on.

Headers

cloudchat-instance
integer
required

Your Cloud Chat instance ID — an integer, fixed for your company, told at onboarding. The API overview explains how instances work, how to find yours, and the errors a wrong or missing value produces.

Example:

1

Path Parameters

accountId
integer
required

Your Cloud Chat account. It has to be an account your token grants membership on, and it has to live on the instance in the cloudchat-instance header — the two travel together. Account numbers are only unique within an instance, so the same number is a different company on another instance. Usually a mismatched pair fails closed with a 401, because your user does not exist on the other instance — but if your identity happens to exist on both, the call succeeds against the other company's data, silently. Read it and you are looking at the wrong help center; write it and you have stored into the wrong account. Send the two values that were given to you together, and never try a number to see what answers.

Example:

1

Body

application/json

A campaign to create and send, together with the reach you are confirming.

campaign
object
required

The campaign itself. Which fields apply depends on the channel, and the channel is never passed directly: it follows from email_campaign_sender_id, or from the type of the inbox.

confirm_recipients
integer
required

The reachable count you are confirming. It has to equal the reachable the preview returned for this exact audience and channel; any other value answers 409 with both numbers and creates nothing. Leaving it out is a 409 too, not a default.

Example:

1187

template_params
object

Values for a WhatsApp template placeholders, keyed by the exact token between the braces: "1", "2" and so on for a positional template, the variable name for a named one. Send exactly as many keys as the template parameters count. A value wrapped in double braces, such as {{contact.name}}, is resolved per recipient at send time; anything else is sent literally to everyone.

Example:
payload_params
object

Values for placeholders inside the template buttons, keyed the same way. Only templates whose buttons carry a placeholder need this.

Response

Created, and already on its way. This is the only response that carries reachable_count.

A one-off campaign as stored. reachable_count is present only in the create response.

id
integer
required

The display id, sequential within the account. Keep it — no endpoint lists campaigns, so this is the only way back to it.

Example:

176

title
string
required

Internal name of the campaign.

Example:

"September reactivation"

message
string
required

The template name on a WhatsApp campaign, the message body on e-mail and widget.

Example:

"reactivation_september"

campaign_status
string
required

Where the campaign is in its lifecycle — not a delivery report. completed means a worker took it over, not that anything arrived: on WhatsApp it is set before the audience is even resolved. failed means a precondition stopped the dispatch and it will not be retried. What actually reached your contacts is in the Cloud Chat campaign dashboard.

The values in use are active, completed, running, draft, partially_completed and failed. The set is open and grows as new states are added, so read an unfamiliar value as a state you do not know yet rather than as an error.

Example:

"completed"

campaign_type
enum<string>
required

Campaigns created through the API are always one_off. A campaign built in Cloud Chat can be ongoing and fire on a trigger instead.

Available options:
ongoing,
one_off
Example:

"one_off"

created_at
string<date-time>
required

When the campaign was created.

Example:

"2026-09-19T17:34:12.881Z"

updated_at
string<date-time>
required

When it last changed.

Example:

"2026-09-19T17:34:15.002Z"

reachable_count
integer

The reach the campaign was confirmed against. Returned only when the campaign is created: reach is computed, never stored, so reading a campaign back omits the field entirely.

Example:

1187

subject
string | null

Subject line of an e-mail campaign; null on the other channels.

inbox_id
integer | null

The inbox that sends. On an e-mail campaign it follows from the sender.

Example:

60

email_campaign_sender_id
integer | null

The verified sender of an e-mail campaign; null on WhatsApp and widget.

sender_id
integer | null

The user the campaign is attributed to. Through the API this is always the identity of the token that created it — authorship cannot be set in the payload.

Example:

895

conversation_label_id
integer | null

Label applied to the conversations the campaign opens, when one was configured.

team_id
integer | null

Team the resulting conversations are assigned to, when one was configured.

recipients_count
integer | null

The raw audience size recorded on the campaign, before the reachability check. It is not what was delivered, and it is not what confirm_recipients is compared against.

Example:

1240

scheduled_at
string<date-time> | null

When the campaign is due out. A campaign created without one carries the moment it was created.

Example:

"2026-09-19T17:34:12.881Z"

started_at
string<date-time> | null

When dispatch began. Always null on a WhatsApp campaign — only the e-mail path fills it — so its absence tells you nothing about whether the campaign ran.

completed_at
string<date-time> | null

When the campaign reached a terminal status; null while it is still open.

Example:

"2026-09-19T17:34:15.002Z"