> For the complete documentation index, see [llms.txt](https://docs.cartat.net/cartat-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cartat.net/cartat-api/whatsapp-official-api/templates/send-message.md).

# Send message

```http
POST /message/text
Authorization: Bearer <cartat_api_token>
Content-Type: application/json
```

Use this endpoint to send an approved template message by template name. Cartat selects the sending provider from the authenticated instance.

### Request body

| Field           | Type            | Required | Description                                                    |
| --------------- | --------------- | -------: | -------------------------------------------------------------- |
| `number`        | string          |      Yes | Receiver WhatsApp number with country code.                    |
| `template_name` | string          |      Yes | Approved template name.                                        |
| `parameters`    | object or array |       No | Body variables for the template.                               |
| `header`        | object          |       No | Header parameter when the template has a media or text header. |
| `buttons`       | array           |       No | Button parameters when the template has dynamic buttons.       |

### Example

```json
{
  "number": "+966501234567",
  "template_name": "invoice_ready",
  "parameters": {
    "customer_name": "John",
    "invoice_number": "INV-1001"
  }
}
```

### Response

```json
{
  "status": "success",
  "id": "wamid.xxxxx",
  "to": "966501234567",
  "type": "template",
  "provider": "meta"
}
```
