Skip to content
API PlatformDevelopers

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 needWhy
A live key with the broadcasts:send permissionTest 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 itA 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 onSending from outside the app is off until a workspace admin turns it on.
Api-Confirm: send and an Idempotency-Key on the requestA 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:

  • sender and template: 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: matched contacts, the reachable ones it would go to (not on do-not-disturb, with a number), and as_of;
  • schedule: the time in UTC and in timezone;
  • platform: can_send and the refusals a real send by this key would get right now (for example broadcast_api_disabled or allowlist_required), broadcasts_today, and recipients: the platform's own count, the one the send uses (recipients_differ is true, with a warning, when it differs from audience.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-Key returns 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, filter and saved_filter_id narrow each other (they are combined with AND). A contact in two groups gets the message once.
  • all_contacts: true sends to every contact of the workspace. It is never implied: a request with no audience is refused (audience_unbounded), and all_contacts cannot 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 a filter with conversationTags.
  • Contacts created after audience_as_of (default: now) are left out.

Message content

  • template_id, or template_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_number or a custom field key).
  • header_text for a text header with {{1}}; header_media_url (https) and header_file_name for a media header; button_url_suffixes for dynamic URL buttons; coupon_code for a copy-code button.

Scheduling

  • send_now: true sends as soon as it is created. Or scheduled_at, not both.
  • scheduled_at is an ISO date and time with an offset (2026-10-02T09:00:00+04:00), or a local time (2026-10-02T09:00) read in timezone.
  • timezone is an IANA name such as Asia/Dubai. Default: the workspace's timezone.
  • At most 30 days ahead, never in the past. Otherwise schedule_invalid, with errors[] pointing at the field.
  • rate ({ "messages": 60, "per": "minute" }) slows the send down, and time_windows limits 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.

CallForHeader
POST /v1/broadcasts/{broadcast_id}/pauseA broadcast that is sending: nothing more goes out until a person resumes it in the app.none
POST /v1/broadcasts/{broadcast_id}/stopSending or paused, for good: contacts not reached yet never get it.Api-Confirm: stop
POST /v1/broadcasts/{broadcast_id}/cancelNot 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

KeyWhat POST /v1/broadcasts does
Test (ak_test_…)Always a preview in sandbox mode, whatever you send. It never creates a broadcast.
Live, without broadcasts:sendPreviews with ?dry_run=true. A real send: 403 insufficient_scope, reason: scope_missing.
Live, with broadcasts:send and an IP allowlistPreviews, 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

LimitDefault
Recipients per send, without confirm_large_send: true5,000
Broadcasts sent from AI apps and API keys per day20
How far ahead a send can be scheduled30 days
Gap between two sends to the same audience10 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 codereasonWhat to do
403 forbiddenbroadcast_api_disabledA workspace admin turns on sending from API keys (above).
403 insufficient_scopescope_missingUse a key with broadcasts:send, or create one on the Keys page.
403 forbiddenallowlist_requiredCreate a key with an IP allowlist (the allowlist of an existing key cannot be changed here).
403 forbiddenip_not_allowedCall from a server on the key's allowlist. See Securing sensitive operations.
403 forbiddenkey_not_liveUse a live key: a test key previews only.
403 forbiddenstep_up_requiredThe 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 forbiddentwo_factor_not_enrolledThe staff member who made the key must set up two-step sign-in first.
403 forbiddenpermission_deniedThe 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 forbiddenpermission_denied with two_factor_resetThe key's maker had two-step sign-in reset. They set it up again, then grant a new key.
403 entitlement_requiredplan_feature_missingThe plan does not include bulk broadcasts.
400 invalid_inputidempotency_requiredAdd an Idempotency-Key header.
400 invalid_inputidempotency_conflictThat key was used for a different broadcast: use a new key.
400 invalid_inputaudience_unboundedChoose group_ids, filter and/or saved_filter_id, or all_contacts: true.
400 invalid_inputaudience_emptyNobody is left after do-not-disturb and missing numbers. Check the filter with Count contacts by filter.
400 invalid_inputaudience_count_requiredPreview it first, then send.
400 invalid_inputcampaign_ambiguousSeveral campaigns exist: pass campaign_id. The preview warns with the same code and lists campaign_choices.
400 invalid_inputtags_not_supportedUse groups, or a filter with conversationTags.
400 invalid_inputinput_not_allowedbypass_rate_limit and batches are available in the app only.
400 invalid_inputschedule_invalidFix scheduled_at or timezone (errors[] points at the field).
400 invalid_input or 429 rate_limitedcap_exceededOver a limit: cap, limit and value say which. A smaller audience, another day, or confirm_large_send: true.
429 rate_limitedcap_exceeded with cap: concurrent_createsAnother broadcast is being created right now. Wait Retry-After (about 5 s), then retry with the same Idempotency-Key.
503 upstream_unavailableaudience_count_unavailableThe audience could not be counted; nothing was sent. Retry in a minute with the same Idempotency-Key.
503 upstream_unavailabledispatch_failedSaved (broadcast_id) but not yet sending. Retry with the same Idempotency-Key: it resumes that broadcast, never a second one.
409 conflicttemplate_not_approvedPick an approved template, or wait for its review.
409 conflictduplicate_audience_recentThe same audience got a broadcast minutes ago: usually a retry loop. Check List broadcasts first.
428 confirm_requiredAdd 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.