Send a broadcast
send_broadcastSend a broadcast
Sends one approved template from one of the agent's WhatsApp numbers to many numbers, right
away, as the dashboard's Broadcasts page does. The answer is 201 with the broadcast,
sending; Mojeeb sends in the background, and each message's delivery comes back on
listBroadcastRecipients. Each recipient lands in their conversation with the agent (one
is started if they have none), so a reply reaches the AI.
A broadcast fills only the template's body variables: parameters for everyone, and a
recipient's own parameters over them. Its header keeps the sample it was approved with,
and no button gets a value, so a template with a header variable or a button that needs a
value per send is 422 template_not_broadcastable (send those one by one with
sendWhatsAppTemplate), and so is one with a location header, which Mojeeb can't send
yet. A template the number doesn't have is 422 template_not_found with
available_templates, or template_not_found_for_language with available_languages.
Only an approved template can be broadcast
(422 template_not_approved). A number listed twice gets one message; recipient_count
says how many will be sent. Mojeeb refuses a broadcast with more recipients than the
number's WhatsApp daily messaging limit allows (422 invalid_request).
It checks the template with Meta, so it shares the WhatsApp template endpoints' budget of 10 requests a minute per key. Plans with broadcasts only.
The MCP server sends this call with an idempotency key of its own, so a retry after a timeout never sends it twice.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | What the team sees in the dashboard's broadcast list. Can't contain angle brackets. | |
| agent_id | Yes | The agent the resource belongs to. Another company's agent, or the nil UUID, is `404 agent_not_found`; an agent outside the key's agent list is `403 agent_not_authorized`. | |
| template | Yes | The template, as `listWhatsAppTemplates` names it: an approved one whose header has no variable and whose buttons need no value. | |
| parameters | No | The body's values for everyone, keyed as the template's `body.parameters` (`"1"` or `"first_name"`). | |
| recipients | Yes | The numbers it goes to, within the 1 MB body; a number listed twice gets one message. | |
| connection_id | Yes | The WhatsApp number it goes from: one of the agent's connections (`listConnections`). |