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

# Template

> Send a WhatsApp template message

## Request

`type` must be `template`.

### Field types

* `to`: string (required)
* `type`: string = `template` (required)
* `templateName`: string (required)
* `language`: string (optional)
* `variables`: array of strings OR object with string values (optional)
* `tags`: array of strings (optional)
* `metadata`: object | string (optional)

```json theme={null}
{
  "to": "+573001112233",
  "type": "template",
  "templateName": "order_update",
  "language": "es",
  "variables": ["Juan", "A123"],
  "tags": ["vip"],
  "metadata": { "source": "api" }
}
```

## Response

Template sends are synchronous.

```json theme={null}
{
  "data": {
    "messageId": "uuid",
    "status": "sent",
    "providerMessageId": "string"
  },
  "meta": {
    "timestamp": "2024-01-01T00:00:00.000Z",
    "mode": "sync"
  }
}
```
