Skip to main content

Overview

The Public Broadcast API gives external systems access to your organization’s WhatsApp Business numbers. Every request is scoped to one organization by the API key, and every WABA phone number you reference must belong to that organization — a key from one organization cannot send from another organization’s number. Two families of endpoints exist on /broadcast/public:
  • v2 endpoints authenticate with your organization auth key. These are the ones documented here.
  • Legacy endpoints still authenticate with the older per-number WABA key and are unchanged. See Legacy endpoints.

Base Configuration

Before You Start

Keep the key server-side. It grants send access to every WhatsApp number your organization owns. Store it in environment variables or a secrets manager, never in browser or mobile code, and use separate keys per environment.
Start here. Call Get phone numbers to discover which WABA numbers your key can send from, then Get templates to confirm a template is approved. Both are cheap, read-only, and confirm your key works before you send anything.

Authentication Flow

1

Use Auth Key in Request Headers

All broadcast endpoints require the generated Auth key in the x-api-key header, and you can find it inside the Workspace → Staff section.

Store your API key securely. Avoid regenerating it unnecessarily.
Find your organization authentication key in the Staff section

What the key resolves to

The key identifies your organization. On endpoints that take a fromPhoneNumber or phone_number, the API additionally verifies that the number is registered to that organization and that its WABA record is complete — waba_id, phone_number_id, phone_number, and access_token must all be present. A mismatch returns 401, not 403.

Endpoint index


Get phone numbers

Lists every WhatsApp Business number registered to your organization. Use the returned phone_number as fromPhoneNumber on the send endpoints.

Endpoint

Request

Response

200 — Phone numbers fetched successfully
An empty data array means the key is valid but no WABA number is connected to the organization yet. That is a configuration state, not an error.

Get templates

Returns the approved WhatsApp templates available to one of your numbers. Call this before a broadcast — sending an unapproved or misspelled template name fails the whole request.

Endpoint

Query parameters

Request

Response

200 — Templates fetched successfully
Count the {{n}} placeholders in the body — that is exactly how many values each recipient’s templateParams array must supply.

Send template broadcast

Sends an approved template to a list of recipients. Behavior changes with list size: up to 1,000 recipients the broadcast is queued synchronously; above that it is split into chunks and processed as a background job you poll for status.

Endpoint

Headers

Body

Recipient object

Request

In this example the first recipient gets their own values and the second falls back to globalTemplateParams.

Responses

200 — Queued (1,000 recipients or fewer)
202 — Accepted for background processing (more than 1,000 recipients)
Keep the jobId — it is the only way to check how the broadcast finished. Poll Get broadcast status with it. 400 — Recipient limit exceeded
400 — Template not approved
Duplicate recipients are rejected, not merged. If the same countryCode + toPhoneNumber pair appears twice, the entire request fails with a 400 naming the index of the duplicate. Deduplicate your list before sending.

Send free-form message

Sends a single message to one recipient. All eight content types share this endpoint — the type field decides which other fields are required.

Endpoint

Common fields

Type-specific fields

The extension is read from the URL path, not the file. A real PNG served from a URL ending in .webp is rejected for image, and a URL with no extension at all is rejected for every media type. Query strings are ignored, so …/photo.png?v=2 is fine.

Text

Image

Document

Audio

Video

Sticker

Location

latitude and longitude must be JSON numbers, not strings. Latitude accepts −90 to 90, longitude −180 to 180.

Interactive — buttons

Up to 3 reply buttons. More than three is rejected.

Interactive — list

Up to 10 rows counted across all sections combined, not per section.

Response

200 — same shape for all eight types

Get broadcast status

Returns the progress of a large broadcast job — the ones that returned 202 and a jobId. Broadcasts of 1,000 recipients or fewer do not create a job and have nothing to poll.

Endpoint

Request

Responses

200 — job record plus a summary of chunk progress
404 — Broadcast job not found 401 — Job belongs to a different organization A job created by another organization returns 401 rather than 404 — job IDs are not enumerable across organizations.

Health check

Confirms the service is up and lists the routes it currently exposes. No API key needed.

Endpoint


Validation rules

These run before anything reaches WhatsApp, so a rejection here costs no message quota. Every failure returns 400 with message: "Validation error" and a specific reason.

Rate limits

Limits are counted in a fixed 60-second window. Most are scoped to your API key and the phone number in the request, so two different sending numbers do not compete for the same budget.

Exceeding a limit

The message tells you exactly how many seconds remain in the window. Wait that long rather than retrying immediately — an immediate retry consumes nothing but returns the same error.

Error Handling

Every error uses the same envelope:

Status codes

The four 401s

All four return 401 but mean different things:
Retry policy. Retry 500 and 503 with exponential backoff. Never retry 400 or 401 — the same request will fail identically. On 429, wait the interval the response names. Always send an Idempotency-Key on requests you intend to retry.

Legacy endpoints

Different authentication. These three predate v2 and still use the older per-number WABA key, not your organization auth_key. They are unchanged and remain supported, but new integrations should use the v2 endpoints above.
Generates a legacy API key for a phone number. Takes phoneNumber, not an organization ID.
Sends one template message. Recipient fields sit at the top level rather than in a data array.
Bulk template send, capped at 1,000 recipients — there is no chunking and no job ID. Exceeding the cap returns 400 in the response body with an HTTP 200 status line, unlike the v2 endpoint which throws.