> ## Documentation Index
> Fetch the complete documentation index at: https://botsify.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Send WhatsApp Broadcast — POST /api/v1/whatsapp/send

> Send a WhatsApp broadcast using an approved Botsify template to one or more recipients, with dynamic variable substitution via the template_data object.

Use this endpoint to send a WhatsApp broadcast message to one or more recipients using a pre-approved template stored in your Botsify account. You supply the template name, a list of recipient user objects, and a `template_data` object containing any dynamic variables the template requires. Make sure the template you reference has been approved by Meta before sending — unapproved templates will result in a delivery failure. Authentication is handled via the `apikey` field or the `X-Api-Key` header.

## Request

<ParamField body="apikey" type="string" required>
  Your bot's API key. You may alternatively supply this value in the `X-Api-Key` request header instead of the body.
</ParamField>

<ParamField body="type" type="integer" required>
  A numeric identifier representing the message type. Refer to your Botsify account settings or template configuration for the correct value.
</ParamField>

<ParamField body="template" type="string" required>
  The name of the approved WhatsApp template to use for this broadcast (e.g., `welcome_message`).
</ParamField>

<ParamField body="users" type="array of objects" required>
  An array of recipient user objects. Each object should include the user's phone number or identifier needed to route the message (e.g., `{"phone": "+1234567890"}`).
</ParamField>

<ParamField body="template_data" type="object" required>
  A key-value object containing the dynamic variable values to inject into the template placeholders. Keys must match the variable names expected by the template.
</ParamField>

## Example Request

```bash theme={null}
curl --request POST \
  --url https://app.botsify.com/api/v1/whatsapp/single-message-send \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: YOUR_BOT_API_KEY' \
  --data '{
    "apikey": "YOUR_BOT_API_KEY",
    "type": 1,
    "template": "welcome_message",
    "users": [
      {"phone": "+1234567890"}
    ],
    "template_data": {
      "name": "John",
      "plan": "Pro"
    }
  }'
```

## Response

A successful request returns a JSON object confirming the broadcast was dispatched. The response includes a broadcast identifier you can use to retrieve delivery reports, along with the number of recipients targeted.

```json theme={null}
{
  "success": true,
  "broadcast_id": "bcast_20240115_001",
  "recipients": 1,
  "template": "welcome_message",
  "status": "queued"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.