/v1/broadcastsbetaCreate and send a WhatsApp broadcast
- Needs
- Send WhatsApp messages; manage templates, quick messages and WhatsApp short links
(messaging:write)andbroadcasts:sendfor 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/orsaved_filter_id, which narrow each other; orall_contacts: true. Contacts created afteraudience_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: truesends 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
Protects against doing it twice if you retry: a retry with the same key gets the first answer back instead of running again.
Previews only, 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
| Field | Type | What it is |
|---|---|---|
| namerequired | string | Shown in the app's broadcast list.1–120 characters |
| channel_id | string | Send from this WhatsApp channel. Default: your default WhatsApp number.pattern ^\d{1,19}$Signed in? Pick one from your data with “My data”. |
| from_phone | string | Instead of channel_id: one of your connected WhatsApp numbers.3–32 characters |
| template_id | string | integer | An APPROVED template. Or template_name + language.Signed in? Pick one from your data with “My data”. |
| template_name | string | Instead of templateId: the exact template name (with language).1–512 characters |
| language | string | With templateName: its language code, e.g. en_US.2–15 characters |
| body_variables | array of string | object | One value per {{n}} of the body, in order: text, or {field, fallback}.0–100 items · default [] |
| header_text | string | object | Value for {{1}} in a TEXT header.1–1024 characters |
| header_media_url | string | https link to the image, video or document of a media header.uri · 0–2000 characters |
| header_file_name | string | DOCUMENT header: file name shown.0–200 characters |
| button_url_suffixes | array of object | One per dynamic URL button.0–2 items · default [] |
| button_indexrequired | integer | Button position (0-based).0–9 |
| valuerequired | string | Replaces {{1}} in the link.0–2000 characters |
| coupon_code | string | Copy-code button value (default: the stored code).0–20 characters |
| group_ids | array of string | integer | Contacts in any of these groups.1–50 items |
| filter | object | The contacts filter (POST /contacts/search format). |
| saved_filter_id | string | integer | A saved contact filter.pattern ^[1-9]\d{0,18}$ |
| all_contacts | boolean | true = every contact of the workspace. Never implied. |
| send_now | boolean | true = send as soon as it is created. Or scheduled_at. |
| scheduled_at | string | ISO date and time with an offset, or a local time read in timezone. At most 30 days ahead.0–40 characters |
| timezone | string | IANA timezone. Default: the workspace's.0–64 characters |
| rate | object | Send rate: {messages, per}. |
| messagesrequired | integer | Messages…1–100000 |
| perrequired | string | …per this unit.one of: second, minute, hour |
| time_windows | array of object | Send only inside these local windows.0–7 items |
| startrequired | string | HH:mm |
| endrequired | string | HH:mm, after start |
| daysrequired | array of string | Days.1–7 items |
| campaign_id | string | 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.pattern ^\d{1,19}$ |
| sandbox | boolean | true = the simulator only, never real customers.default false |
| audience_as_of | string | Contacts created after this instant are left out (the preview returns one). Default: now.0–40 characters |
| confirm_large_send | boolean | true = you confirm a send above the workspace's per-send recipient limit (5,000 by default; cap_exceeded otherwise). |
Headers
| Field | Type | What it is |
|---|---|---|
| Authorizationrequired | header | Bearer $API_KEY — your API key. |
| Api-Version | header | The 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-Key | header | Any 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-Confirmrequired | header | Type 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`).
| Field | Type | What it is |
|---|---|---|
| broadcastrequired | object or null | The created broadcast (null in a preview). |
| idrequired | string | |
| statusrequired | string or null | |
| scheduled_atrequired | string or null | |
| namerequired | string | |
| senderrequired | object | |
| channel_idrequired | string | |
| namerequired | string or null | |
| identifierrequired | string or null | |
| statusrequired | string | |
| qualityrequired | string or null | Meta quality rating: GREEN, YELLOW or RED; null = not known. |
| limit_tierrequired | string or null | Meta messaging-limit tier (TIER_250, TIER_1K … TIER_UNLIMITED); null = not known. |
| daily_limitrequired | integer or null | New conversations a day the tier allows; null = unlimited or not known.-9007199254740991–9007199254740991 |
| templaterequired | object | |
| idrequired | string | |
| namerequired | string | |
| languagerequired | string or null | |
| categoryrequired | string or null | |
| messagerequired | string or null | The body as sent: fixed values filled in, {field|fallback} per contact. |
| headerrequired | string or null | The header as sent (text, or the media link). |
| buttonsrequired | string or null | Dynamic links and codes as sent. |
| audiencerequired | object | |
| matchedrequired | integer | Contacts that match.-9007199254740991–9007199254740991 |
| reachablerequired | integer | Of those, the ones it is sent to (not on do-not-disturb, with a number).-9007199254740991–9007199254740991 |
| approximaterequired | boolean | |
| as_ofrequired | string | Contacts created after this are excluded. Pass it back as audienceAsOf to send. |
| selectionrequired | array of string | |
| schedulerequired | object | |
| send_nowrequired | boolean | |
| atrequired | string or null | UTC. |
| timezonerequired | string | |
| localrequired | string or null | |
| estimated_minutesrequired | number or null | From the send rate; null when no rate is set. |
| campaignrequired | object or null | null in a preview where the campaign is not chosen yet (see the campaign choices). |
| idrequired | string | |
| namerequired | string or null | |
| campaign_choicesrequired | array of object | Preview only, when several campaigns exist and none was passed: pass one of these as the campaign id. |
| idrequired | string | |
| namerequired | string or null | |
| sandboxrequired | boolean | |
| platformrequired | object or null | The platform's own check of this send (preview only; null when it cannot tell). |
| can_sendrequired | boolean | |
| refusalsrequired | array of object | What a real send would be refused with now (e.g. broadcast_api_disabled). |
| reasonrequired | string | |
| messagerequired | string | |
| broadcasts_todayrequired | object or null | |
| usedrequired | integer | -9007199254740991–9007199254740991 |
| limitrequired | integer | -9007199254740991–9007199254740991 |
| recipientsrequired | integer or null | The platform's own recipient count — the one the send uses (it sets estimated_recipients itself); null when not reported.-9007199254740991–9007199254740991 |
| recipients_differrequired | boolean | true when the platform's count differs from audience.reachable (a warning says so). |
| warningsrequired | array of string | |
| warning_codesrequired | array of string | Stable 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_run | boolean | true when this was a dry run: every check ran and nothing changed. |
Errors
Errors are application/problem+json. Branch on code.
| Status | Code | When |
|---|---|---|
| 400 | invalid_input | A field is missing or has the wrong format. |
| 401 | unauthenticated | 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). |
| 403 | entitlement_required | The workspace's plan does not include API access ( |
| 403 | forbidden |
|
| 403 | insufficient_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 |
| 404 | not_found | The channel, template, group, saved filter or campaign does not exist in your workspace. |
| 409 | conflict |
|
| 428 | confirm_required | Send the header |
| 429 | rate_limited | The key or workspace went over its rate limit, or a service behind the API asked to slow down. Wait for |
| 503 | upstream_unavailable | A service behind the API is briefly unavailable. Safe to retry with backoff. |
| 504 | timeout | 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.