Skip to content
API PlatformDevelopers
POST/v1/broadcastsbeta

Create and send a WhatsApp broadcast

Needs
Send WhatsApp messages; manage templates, quick messages and WhatsApp short links (messaging:write) and broadcasts:send for a real send: a live key with an IP allowlist, granted with a two-factor code. A preview needs only messaging:write.
Plan
Any plan with API access and bulk broadcasts
Limits
60 a minute per key
Dry run
Yes — a full preview with ?dry_run=true
Confirm
Header Api-Confirm: send
Undo
A sent message cannot be recalled. Pause (POST /broadcasts/{broadcast_id}/pause) or stop a broadcast that is sending; cancel one that is scheduled.
Read first
Sending broadcastsSecuring sensitive operations

Sends one approved WhatsApp template to many contacts: now, or at a scheduled time. Customers receive it and it cannot be undone.

The key needs the broadcasts:send permission, which a workspace admin grants with a two-factor code and only together with an IP allowlist on the key; every request must come from an allowed address. A workspace admin must also allow sending broadcasts from API keys in the AI assistant settings (with their two-factor code; not the general workspace settings). The call needs Api-Confirm: send and an Idempotency-Key (a retry with the same key never sends twice).

  • Audience: group_ids, filter (the contacts filter) and/or saved_filter_id, which narrow each other; or all_contacts: true. Contacts created after audience_as_of (default: now) are left out. Contact tags cannot choose an audience (reason: tags_not_supported).
  • Variables: one per {{n}} of the body, in order: text, or {"field": "contact.name", "fallback": "there"} for a value per contact.
  • sandbox: true sends to the simulator only. A test key always previews, in sandbox mode.

Preview it first with ?dry_run=true: the audience count, the filled message, the schedule and warnings; nothing is created.

Try it

Body

Shown in the app's broadcast list.

Send from this WhatsApp channel. Default: your default WhatsApp number.

Instead of `channel_id`: one of your connected WhatsApp numbers.

An APPROVED template. Or `template_name` + `language`.

Instead of templateId: the exact template name (with language).

With templateName: its language code, e.g. en_US.

One value per `{{n}}` of the body, in order: text, or `{field, fallback}`.

Value for `{{1}}` in a TEXT header.

https link to the image, video or document of a media header.

DOCUMENT header: file name shown.

One per dynamic URL button.

Copy-code button value (default: the stored code).

Contacts in any of these groups.

0 / 16,384 bytes as JSON

Limits: at most 8 levels deep, 60 conditions, 500 items per list, 500 characters per value, regex ≤ 200 characters, 16 KB in all. Format, operators and recipes: Filtering contacts.

The contacts filter (`POST /contacts/search` format).

A saved contact filter.

`true` = every contact of the workspace. Never implied.

`true` = send as soon as it is created. Or `scheduled_at`.

ISO date and time with an offset, or a local time read in `timezone`. At most 30 days ahead.

IANA timezone. Default: the workspace's.

rate

Send rate: `{messages, per}`.

Messages…

…per this unit.

Send only inside these local windows.

The campaign to file it under. Default: your only campaign. With several, a dry run warns (`campaign_ambiguous`, `campaign_choices`) and the real send needs it.

`true` = the simulator only, never real customers.

Contacts created after this instant are left out (the preview returns one). Default: now.

`true` = you confirm a send above the workspace's per-send recipient limit (5,000 by default; `cap_exceeded` otherwise).

Protects against doing it twice if you retry: a retry with the same key gets the first answer back instead of running again.

Test mode (dry run): nothing will change
Turns test mode off for this page only. It switches back when you leave the page.

Previews only, in sandbox mode

This playground never sends a broadcast. Every run is a dry run in sandbox mode (?dry_run=true, "sandbox": true) and never carries Api-Confirm: send: you see the audience count, the filled message and the schedule, and nothing is created. Send real broadcasts from your own server with a live key: see Sending broadcasts.

Code and response

curl -X POST 'https://api.wa-api.cloud/v1/broadcasts?dry_run=true' \
  -H "Authorization: Bearer $API_KEY" \
  -H 'Content-Type: application/json' \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "name": "October sale",
  "channel_id": "301",
  "template_id": "9120",
  "body_variables": [
    {
      "field": "contact.name",
      "fallback": "there"
    },
    "20%"
  ],
  "group_ids": [
    "12"
  ],
  "scheduled_at": "2026-10-02T09:00:00+04:00",
  "timezone": "Asia/Dubai",
  "sandbox": true
}'

The code reads your key from $API_KEY.

Body

Body fields
FieldTypeWhat it is
namerequiredstringShown in the app's broadcast list.1–120 characters
channel_idstringSend from this WhatsApp channel. Default: your default WhatsApp number.pattern ^\d{1,19}$Signed in? Pick one from your data with “My data”.
from_phonestringInstead of channel_id: one of your connected WhatsApp numbers.3–32 characters
template_idstring | integerAn APPROVED template. Or template_name + language.Signed in? Pick one from your data with “My data”.
template_namestringInstead of templateId: the exact template name (with language).1–512 characters
languagestringWith templateName: its language code, e.g. en_US.2–15 characters
body_variablesarray of string | objectOne value per {{n}} of the body, in order: text, or {field, fallback}.0–100 items · default []
header_textstring | objectValue for {{1}} in a TEXT header.1–1024 characters
header_media_urlstringhttps link to the image, video or document of a media header.uri · 0–2000 characters
header_file_namestringDOCUMENT header: file name shown.0–200 characters
button_url_suffixesarray of objectOne per dynamic URL button.0–2 items · default []
button_indexrequiredintegerButton position (0-based).0–9
valuerequiredstringReplaces {{1}} in the link.0–2000 characters
coupon_codestringCopy-code button value (default: the stored code).0–20 characters
group_idsarray of string | integerContacts in any of these groups.1–50 items
filterobjectThe contacts filter (POST /contacts/search format).
saved_filter_idstring | integerA saved contact filter.pattern ^[1-9]\d{0,18}$
all_contactsbooleantrue = every contact of the workspace. Never implied.
send_nowbooleantrue = send as soon as it is created. Or scheduled_at.
scheduled_atstringISO date and time with an offset, or a local time read in timezone. At most 30 days ahead.0–40 characters
timezonestringIANA timezone. Default: the workspace's.0–64 characters
rateobjectSend rate: {messages, per}.
messagesrequiredintegerMessages…1–100000
perrequiredstring…per this unit.one of: second, minute, hour
time_windowsarray of objectSend only inside these local windows.0–7 items
startrequiredstringHH:mm
endrequiredstringHH:mm, after start
daysrequiredarray of stringDays.1–7 items
campaign_idstringThe campaign to file it under. Default: your only campaign. With several, a dry run warns (campaign_ambiguous, campaign_choices) and the real send needs it.pattern ^\d{1,19}$
sandboxbooleantrue = the simulator only, never real customers.default false
audience_as_ofstringContacts created after this instant are left out (the preview returns one). Default: now.0–40 characters
confirm_large_sendbooleantrue = you confirm a send above the workspace's per-send recipient limit (5,000 by default; cap_exceeded otherwise).

Headers

Headers
FieldTypeWhat it is
AuthorizationrequiredheaderBearer $API_KEY — your API key.
Api-VersionheaderThe API version to use, e.g. 2026-10-01. Default: the version your key is pinned to.one of: 2026-10-01 · pattern ^\d{4}-\d{2}-\d{2}$
Idempotency-KeyheaderAny unique string (8–128 characters). A retry with the same key returns the first answer instead of running twice. Kept 24 hours.pattern ^[A-Za-z0-9._:-]+$ · 8–128 characters
Api-ConfirmrequiredheaderType the operation's verb (e.g. delete, submit) to confirm a change that cannot be undone or that WhatsApp or your customers see. Not needed with dry_run=true.

Response 201

The broadcast (`broadcast.id`, `status`: `SCHEDULED` or `PENDING`) with what it sends, or the dry-run preview (`broadcast: null`).

Response fields
FieldTypeWhat it is
broadcastrequiredobject or nullThe created broadcast (null in a preview).
idrequiredstring
statusrequiredstring or null
scheduled_atrequiredstring or null
namerequiredstring
senderrequiredobject
channel_idrequiredstring
namerequiredstring or null
identifierrequiredstring or null
statusrequiredstring
qualityrequiredstring or nullMeta quality rating: GREEN, YELLOW or RED; null = not known.
limit_tierrequiredstring or nullMeta messaging-limit tier (TIER_250, TIER_1K … TIER_UNLIMITED); null = not known.
daily_limitrequiredinteger or nullNew conversations a day the tier allows; null = unlimited or not known.-9007199254740991–9007199254740991
templaterequiredobject
idrequiredstring
namerequiredstring
languagerequiredstring or null
categoryrequiredstring or null
messagerequiredstring or nullThe body as sent: fixed values filled in, {field|fallback} per contact.
headerrequiredstring or nullThe header as sent (text, or the media link).
buttonsrequiredstring or nullDynamic links and codes as sent.
audiencerequiredobject
matchedrequiredintegerContacts that match.-9007199254740991–9007199254740991
reachablerequiredintegerOf those, the ones it is sent to (not on do-not-disturb, with a number).-9007199254740991–9007199254740991
approximaterequiredboolean
as_ofrequiredstringContacts created after this are excluded. Pass it back as audienceAsOf to send.
selectionrequiredarray of string
schedulerequiredobject
send_nowrequiredboolean
atrequiredstring or nullUTC.
timezonerequiredstring
localrequiredstring or null
estimated_minutesrequirednumber or nullFrom the send rate; null when no rate is set.
campaignrequiredobject or nullnull in a preview where the campaign is not chosen yet (see the campaign choices).
idrequiredstring
namerequiredstring or null
campaign_choicesrequiredarray of objectPreview only, when several campaigns exist and none was passed: pass one of these as the campaign id.
idrequiredstring
namerequiredstring or null
sandboxrequiredboolean
platformrequiredobject or nullThe platform's own check of this send (preview only; null when it cannot tell).
can_sendrequiredboolean
refusalsrequiredarray of objectWhat a real send would be refused with now (e.g. broadcast_api_disabled).
reasonrequiredstring
messagerequiredstring
broadcasts_todayrequiredobject or null
usedrequiredinteger-9007199254740991–9007199254740991
limitrequiredinteger-9007199254740991–9007199254740991
recipientsrequiredinteger or nullThe platform's own recipient count — the one the send uses (it sets estimated_recipients itself); null when not reported.-9007199254740991–9007199254740991
recipients_differrequiredbooleantrue when the platform's count differs from audience.reachable (a warning says so).
warningsrequiredarray of string
warning_codesrequiredarray of stringStable codes of the warnings that have one: tier_too_low, quality_low, quality_medium, large_send, all_contacts, audience_reread, campaign_ambiguous, campaign_required.
dry_runbooleantrue when this was a dry run: every check ran and nothing changed.

Errors

Errors are application/problem+json. Branch on code.

StatusCodeWhen
400invalid_input

A field is missing or has the wrong format. errors[] points at each field. The same Idempotency-Key was used for a different broadcast (reason: idempotency_conflict), or the audience was not counted (reason: audience_count_required). reason: audience_unbounded (no audience: choose one, or all_contacts: true), audience_empty (nobody can receive it), tags_not_supported, input_not_allowed (bypass_rate_limit, batches), schedule_invalid, cap_exceeded (with cap, limit, value), idempotency_required, campaign_ambiguous (several campaigns and no campaign_id, real send only — pass one of choices; a dry run answers with a warning and campaign_choices instead), channel_ambiguous, unknown_field, url_refused, preview_stale, unsupported_template; errors[] points at each field.

401unauthenticated

The Authorization header is missing, the key is unknown, expired or revoked, or the request came from an address outside the key's IP allowlist (checked on every operation, before anything runs).

403entitlement_required

The workspace's plan does not include API access (api_access). The workspace's plan does not include bulk broadcasts (reason: plan_feature_missing).

403forbidden

reason: broadcast_api_disabled (the workspace does not allow sending from API keys), allowlist_required (the key has no IP allowlist), ip_not_allowed (the request came from another address), key_not_live (a test key), sandbox_only (the portal playground sends in sandbox mode only), permission_denied (the key's staff member may not send broadcasts), step_up_required (the platform asked for a two-factor confirmation, which a key cannot give: the key no longer qualifies to stand in for it — create a new key with broadcasts:send), auth_template. tier_too_low is never a refusal: it is a preview warning (warning_codes) when the audience is above the number's daily messaging limit.

403insufficient_scope

The key does not have the permission this operation needs. Checked before the body and headers: without the permission, this is the answer whatever was sent. The key does not hold broadcasts:send (reason: scope_missing).

404not_found

The channel, template, group, saved filter or campaign does not exist in your workspace.

409conflict

reason: template_not_approved, channel_not_connected, duplicate_audience_recent (the same audience was sent to a few minutes ago). Also returned while a request with the same Idempotency-Key is still running.

428confirm_required

Send the header Api-Confirm: send to confirm. Not needed with dry_run=true.

429rate_limited

The key or workspace went over its rate limit, or a service behind the API asked to slow down. Wait for Retry-After seconds (always sent). reason: cap_exceeded for a daily limit (with cap, limit), or channel_busy (a broadcast was created on this number seconds ago).

503upstream_unavailable

A service behind the API is briefly unavailable. Safe to retry with backoff. reason: audience_count_unavailable (the audience could not be counted; nothing was sent) or dispatch_failed (saved but not handed to sending, with broadcast_id). Retry with the SAME Idempotency-Key: it resumes that broadcast, never a second one.

504timeout

The change did not finish in time. Retry with the same Idempotency-Key: it never runs twice.

Examples

Schedule a promotion to a group

Request body

{
  "name": "October sale",
  "channel_id": "301",
  "template_id": "9120",
  "body_variables": [
    {
      "field": "contact.name",
      "fallback": "there"
    },
    "20%"
  ],
  "group_ids": [
    "12"
  ],
  "scheduled_at": "2026-10-02T09:00:00+04:00",
  "timezone": "Asia/Dubai"
}

Response 201

{
  "broadcast": null,
  "name": "October sale",
  "sender": {
    "channel_id": "301",
    "name": "Main WhatsApp",
    "identifier": "+15555550100",
    "status": "connected",
    "quality": "GREEN",
    "limit_tier": "TIER_250",
    "daily_limit": 250
  },
  "template": {
    "id": "9120",
    "name": "october_sale",
    "language": "en_US",
    "category": "MARKETING"
  },
  "message": "Hi {contact.name|there}, everything is 20% off this week.",
  "header": null,
  "buttons": null,
  "audience": {
    "matched": 412,
    "reachable": 398,
    "approximate": false,
    "as_of": "2026-10-01T08:00:00.000Z",
    "selection": [
      "groups 12 (any of them)"
    ]
  },
  "schedule": {
    "send_now": false,
    "at": "2026-10-02T05:00:00.000Z",
    "timezone": "Asia/Dubai",
    "local": "2026-10-02 09:00 (Asia/Dubai)"
  },
  "estimated_minutes": null,
  "campaign": {
    "id": "7",
    "name": "Autumn"
  },
  "campaign_choices": [],
  "sandbox": false,
  "platform": {
    "recipients": 398,
    "recipients_differ": false,
    "can_send": true,
    "refusals": [],
    "broadcasts_today": {
      "used": 2,
      "limit": 20
    }
  },
  "warnings": [
    "14 matching contact(s) are skipped (do-not-disturb, or no WhatsApp number).",
    "398 recipients is above the WhatsApp number's messaging limit (250 new conversations a day): the send takes about 2 days, or Meta refuses the rest (tier_too_low)."
  ],
  "warning_codes": [
    "tier_too_low"
  ],
  "dry_run": true
}

Operation path

The same operation is also at POST /v1/ops/messaging_create_broadcast, with every field in the JSON body.