Schedule a bulk template broadcast to many recipients
WhatsApp
POST /v1/messages/bulk
Send an approved template to multiple recipients in a single request. Up to 5000 recipients per call. Returns a broadcast id for tracking.
POST
Schedule a bulk template broadcast to many recipients
Send the same template to multiple recipients, with potentially different variables per recipient. Creates a broadcast in the database that you can track via
Structure of each
GET /v1/messages/bulk/:broadcastId.
Endpoint
Required scope
messages:bulk
Headers
| Header | Required | Value |
|---|---|---|
Authorization | Yes | Bearer kbai_pk_<token> |
Content-Type | Yes | application/json |
Body
| Field | Type | Required | Description |
|---|---|---|---|
template_name | string | Yes | Name of the approved template. |
language | string | Yes | Template language code. |
channel_id | string | Yes | ObjectId of the sending WhatsApp channel. |
campaign_name | string | No | Human-readable name to identify the campaign in the portal. Auto-generated if omitted. |
recipients | array | Yes | Between 1 and 5000 recipients. Each item: { to, variables?, meta_data? }. |
Structure of each recipients[i]
| Field | Type | Required | Description |
|---|---|---|---|
to | string | Yes | Phone number in E.164 format. |
variables | object<string, string> | No | Template variables for this specific recipient. |
meta_data | object | No | Free-form metadata persisted with this individual send. |
Example request
Response
202 Accepted
| Field | Type | Description |
|---|---|---|
broadcast_id | string | Broadcast id. Store it to check status later. |
status | string | Initial status: PENDING. Switches to IN_PROGRESS once processing starts. |
total_recipients | number | Number of accepted recipients. |
scheduled_at | string | null | Schedule date if applicable. |
400 Bad Request
Invalid body: empty array, more than 5000 recipients, malformed phone number on any recipient.401 Unauthorized
Missing, invalid, revoked, or expired token.403 Forbidden
The token does not have themessages:bulk scope.
Best practices
- Split very large batches. If your campaign has 50000 recipients, send 10 requests of 5000 each instead of fighting with timeouts. Use different
campaign_namevalues to keep them distinct. - Deduplicate before sending. The API does not deduplicate by phone number — if you send the same recipient twice, the message goes out twice and Meta charges twice.
- Keep variables consistent with the template. If the template expects
{{nombre}}and{{monto}}and a recipient is missingmonto, that individual send will fail. Validate the variable set up front. - Monitor status via
GET /v1/messages/bulk/:broadcastIdto detect campaigns with a high error rate.
Authorizations
Personal Access Token con prefijo kbai_pk_. Generar desde el portal con permiso developer.manage_tokens.
Body
application/json
WhatsApp Business phone_number_id (numeric identifier issued by Meta for the sending number).
Example:
"100000000000001"
Example:
"welcome_v2"
Example:
"es"
Example:
"Onboarding marzo 2026"