> ## Documentation Index
> Fetch the complete documentation index at: https://docs.enigma-ai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# WhatsApp Send Template

> Endpoint to send WhatsApp template messages.

## Send WhatsApp Template

**Endpoint**: `POST /api/v1/whatsapp/send-template`

**Purpose**: Sends a pre‑approved template message to a WhatsApp user.

**Request Body** (JSON):

```json theme={null}
{
  "to": "+1234567890",
  "template": "order_confirmation",
  "language": "en_US",
  "components": [
    {
      "type": "body",
      "parameters": [
        { "type": "text", "text": "Order #12345" },
        { "type": "text", "text": "$99.99" }
      ]
    }
  ]
}
```

**Headers**:

* `Authorization: Bearer <API_KEY>`
* `Content-Type: application/json`

**Response**:

* `200 OK` – Message accepted for delivery.
* Body:

```json theme={null}
{
  "message_id": "wamid.HBgM...",
  "status": "sent"
}
```

**Error Cases**:

* `400 Bad Request` – Invalid payload.
* `401 Unauthorized` – Invalid or missing API key.
* `404 Not Found` – Template not found or not approved.

**Authentication**: API key in `Authorization` header.

**Permissions**: Requires `whatsapp:send` scope.
