Sending broadcasts
Preview a broadcast, send it with a live key from your server, schedule it, and pause, stop or cancel it.
A broadcast sends one approved WhatsApp template to many contacts at once, now or at a scheduled time. Customers receive it, and a sent message cannot be recalled. That is why a real send takes more than an ordinary change:
| You need | Why |
|---|---|
A live key with the broadcasts:send permission | Test keys only preview. The permission is granted with a two-factor code. |
| An IP allowlist on that key, and the call made from an address on it | A leaked key cannot send from somewhere else. See Securing sensitive operations. |
| The workspace setting that allows sending broadcasts from AI apps and API keys turned on | Sending from outside the app is off until a workspace admin turns it on. |
Api-Confirm: send and an Idempotency-Key on the request | A bug cannot send by accident, and a retry never sends twice. |
The key also acts as the staff member who made it: that person must be allowed to send broadcasts in the app, and the workspace's plan must include bulk broadcasts.
1. Preview it (dry run)
Always preview first. Add ?dry_run=true: every check runs, nothing is created, nothing is sent, and a preview needs neither broadcasts:send nor the headers.
curl -X POST "https://api.wa-api.cloud/v1/broadcasts?dry_run=true" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-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"
}'The preview answers 201 with broadcast: null and dry_run: true, and tells you what the real send would do:
senderandtemplate: the WhatsApp number and the approved template it would use;message: the body with your values filled in ({contact.name|there}marks a value taken from each contact);audience:matchedcontacts, thereachableones it would go to (not on do-not-disturb, with a number), andas_of;schedule: the time in UTC and intimezone;platform:can_sendand therefusalsa real send by this key would get right now (for examplebroadcast_api_disabledorallowlist_required),broadcasts_today, andrecipients: the platform's own count, the one the send uses (recipients_differis true, with a warning, when it differs fromaudience.reachable);warnings: contacts skipped, a large audience, and similar.
2. Send it
When the preview looks right, send the same body without dry_run, from a server on the key's allowlist, with both headers. Pass the preview's audience.as_of as audience_as_of, so contacts added after you checked are left out:
curl -X POST "https://api.wa-api.cloud/v1/broadcasts" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-H "Api-Confirm: send" \
-H "Idempotency-Key: october-sale-2026" \
-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",
"audience_as_of": "2026-10-01T08:00:00.000Z"
}'The answer has broadcast: { id, status, scheduled_at }. Keep the id: you need it to follow, pause, stop or cancel the broadcast.
- Idempotency: a retry with the same
Idempotency-Keyreturns the first broadcast (Idempotent-Replayed: true) and never sends twice. The same key with a different body is refused (reason: idempotency_conflict). Use one key per broadcast, for example your campaign id. See Safe retries. - Every real send is recorded and announced: workspace admins are notified, with the key that sent it.
- Follow it with List broadcasts and Get a broadcast: status and delivery numbers.
Who receives it
group_ids: contacts in any of these groups (at most 50).filter: the contacts filter, the same format as Search contacts (see Filtering contacts).saved_filter_id: a saved contact filter.group_ids,filterandsaved_filter_idnarrow each other (they are combined with AND). A contact in two groups gets the message once.all_contacts: truesends to every contact of the workspace. It is never implied: a request with no audience is refused (audience_unbounded), andall_contactscannot be combined with another audience.- Contacts on do-not-disturb, and contacts without a WhatsApp number, are skipped. If nobody is left, the send is refused (
audience_empty). - Contact tags cannot choose an audience (
tags_not_supported): use groups, or afilterwithconversationTags. - Contacts created after
audience_as_of(default: now) are left out.
Message content
template_id, ortemplate_name+language: an approved template. Authentication (one-time code) templates cannot be broadcast.body_variables: one value per{{n}}of the body, in order. Text, or{ "field": "contact.name", "fallback": "there" }for a value per contact (contact.name,contact.phone_numberor a custom field key).header_textfor a text header with{{1}};header_media_url(https) andheader_file_namefor a media header;button_url_suffixesfor dynamic URL buttons;coupon_codefor a copy-code button.
Scheduling
send_now: truesends as soon as it is created. Orscheduled_at, not both.scheduled_atis an ISO date and time with an offset (2026-10-02T09:00:00+04:00), or a local time (2026-10-02T09:00) read intimezone.timezoneis an IANA name such asAsia/Dubai. Default: the workspace's timezone.- At most 30 days ahead, never in the past. Otherwise
schedule_invalid, witherrors[]pointing at the field. rate({ "messages": 60, "per": "minute" }) slows the send down, andtime_windowslimits it to local hours on chosen days.- When a scheduled broadcast starts, the platform checks again that the key is still valid, its owner may still send, and the template is still approved. If not, the broadcast is cancelled and admins are told why.
Pause, stop or cancel
These three reduce harm, so they need no two-factor code and no broadcasts:send, only messaging:write and the workspace switch.
| Call | For | Header |
|---|---|---|
POST /v1/broadcasts/{broadcast_id}/pause | A broadcast that is sending: nothing more goes out until a person resumes it in the app. | none |
POST /v1/broadcasts/{broadcast_id}/stop | Sending or paused, for good: contacts not reached yet never get it. | Api-Confirm: stop |
POST /v1/broadcasts/{broadcast_id}/cancel | Not started yet (scheduled, or still preparing its audience): nobody gets it. | Api-Confirm: cancel |
The answer is { id, name, status, previous_status, changed }. changed: false means it already was in that state. The wrong status is 409 conflict with reason: wrong_status and current_status: for example, a broadcast that is sending is paused or stopped, never cancelled. Resuming stays in the app.
Test keys and live keys
| Key | What POST /v1/broadcasts does |
|---|---|
Test (ak_test_…) | Always a preview in sandbox mode, whatever you send. It never creates a broadcast. |
Live, without broadcasts:send | Previews with ?dry_run=true. A real send: 403 insufficient_scope, reason: scope_missing. |
Live, with broadcasts:send and an IP allowlist | Previews, and real sends from an allowed address. |
sandbox: true on a real send goes to the simulator only, never to real customers: useful for testing your integration end to end.
The playground on this site only previews broadcasts. It always runs them as a dry run in sandbox mode and never sends Api-Confirm: send, whatever key you pick. Send real broadcasts from your own server.
Turning it on for the workspace
Sending broadcasts from outside the app is off by default, for AI apps and API keys alike. A workspace admin turns it on in the app, in the AI assistant's settings (the setting that allows sending broadcasts from the assistant, AI apps and API keys), and confirms with their two-factor code. Until then every send is refused with broadcast_api_disabled, and no key can be given broadcasts:send. Turning it off later stops every key's sends at once; the keys keep their permission.
Limits
| Limit | Default |
|---|---|
Recipients per send, without confirm_large_send: true | 5,000 |
| Broadcasts sent from AI apps and API keys per day | 20 |
| How far ahead a send can be scheduled | 30 days |
| Gap between two sends to the same audience | 10 minutes |
Your plan may change these. Over a limit the send is refused with reason: cap_exceeded and cap, limit and value; an audience is never cut short silently.
Common refusals
Every refusal is application/problem+json with a stable reason. Nothing is sent when a request is refused.
| Status and code | reason | What to do |
|---|---|---|
403 forbidden | broadcast_api_disabled | A workspace admin turns on sending from API keys (above). |
403 insufficient_scope | scope_missing | Use a key with broadcasts:send, or create one on the Keys page. |
403 forbidden | allowlist_required | Create a key with an IP allowlist (the allowlist of an existing key cannot be changed here). |
403 forbidden | ip_not_allowed | Call from a server on the key's allowlist. See Securing sensitive operations. |
403 forbidden | key_not_live | Use a live key: a test key previews only. |
403 forbidden | step_up_required | The platform wants a fresh two-factor confirmation, which a key cannot give. Send from the app, or ask your admin to check the key's permission. |
403 forbidden | two_factor_not_enrolled | The staff member who made the key must set up two-step sign-in first. |
403 forbidden | permission_denied | The staff member who made the key may not send broadcasts. An admin gives them broadcast access, or someone who has it makes the key. |
403 forbidden | permission_denied with two_factor_reset | The key's maker had two-step sign-in reset. They set it up again, then grant a new key. |
403 entitlement_required | plan_feature_missing | The plan does not include bulk broadcasts. |
400 invalid_input | idempotency_required | Add an Idempotency-Key header. |
400 invalid_input | idempotency_conflict | That key was used for a different broadcast: use a new key. |
400 invalid_input | audience_unbounded | Choose group_ids, filter and/or saved_filter_id, or all_contacts: true. |
400 invalid_input | audience_empty | Nobody is left after do-not-disturb and missing numbers. Check the filter with Count contacts by filter. |
400 invalid_input | audience_count_required | Preview it first, then send. |
400 invalid_input | campaign_ambiguous | Several campaigns exist: pass campaign_id. The preview warns with the same code and lists campaign_choices. |
400 invalid_input | tags_not_supported | Use groups, or a filter with conversationTags. |
400 invalid_input | input_not_allowed | bypass_rate_limit and batches are available in the app only. |
400 invalid_input | schedule_invalid | Fix scheduled_at or timezone (errors[] points at the field). |
400 invalid_input or 429 rate_limited | cap_exceeded | Over a limit: cap, limit and value say which. A smaller audience, another day, or confirm_large_send: true. |
429 rate_limited | cap_exceeded with cap: concurrent_creates | Another broadcast is being created right now. Wait Retry-After (about 5 s), then retry with the same Idempotency-Key. |
503 upstream_unavailable | audience_count_unavailable | The audience could not be counted; nothing was sent. Retry in a minute with the same Idempotency-Key. |
503 upstream_unavailable | dispatch_failed | Saved (broadcast_id) but not yet sending. Retry with the same Idempotency-Key: it resumes that broadcast, never a second one. |
409 conflict | template_not_approved | Pick an approved template, or wait for its review. |
409 conflict | duplicate_audience_recent | The same audience got a broadcast minutes ago: usually a retry loop. Check List broadcasts first. |
428 confirm_required | Add Api-Confirm: send (stop, cancel for those calls). |
tier_too_low is a warning, not a refusal: the WhatsApp number's messaging limit is below the audience, so the send spreads over several days.
See also Errors and Dry runs and confirmations.