Skip to main content
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 GET /v1/messages/bulk/:broadcastId.

Endpoint

Required scope

messages:bulk
The messages:bulk scope is separate from messages:send precisely because bulk sending carries higher risk (Meta cost, sender number reputation, potential abuse). Grant it only to tokens controlled by the marketing tool or the job that needs to trigger campaigns.

Headers

Body

Structure of each recipients[i]

Example request

Response

202 Accepted

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 the messages: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_name values 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 missing monto, that individual send will fail. Validate the variable set up front.
  • Monitor status via GET /v1/messages/bulk/:broadcastId to detect campaigns with a high error rate.

Authorizations

Authorization
string
header
required

Personal Access Token con prefijo kbai_pk_. Generar desde el portal con permiso developer.manage_tokens.

Body

application/json
template_name
string
required
Example:

"welcome_v2"

language
string
required
Example:

"es"

recipients
object[]
required
Required array length: 1 - 5000 elements
channel_id
string

Keebai channel id. Optional when the tenant has exactly one active channel of the given type; required to disambiguate otherwise.

Example:

"665f1a2b3c4d5e6f70819234"

phone_number_id
string

WhatsApp-only alias for channel_id: the Meta phone_number_id of the sending number. Ignored on other channels.

Example:

"100000000000001"

campaign_name
string
Example:

"Onboarding marzo 2026"

Response

202 - application/json
broadcast_id
string
required
status
string
required
Example:

"scheduled"

total_recipients
number
required
scheduled_at
string | null