# WhatsApp templates

> Create message templates, get them approved by WhatsApp, and fill in their variables when you send.

Every WhatsApp message you send is a template: a message format WhatsApp approved in advance, with variables you fill in for each recipient. You need at least one **approved** template before you can send.

## What a template contains

| Part | Required | Limits |
| --- | --- | --- |
| Name | Yes | Lowercase letters, numbers, and underscores, such as `order_update`. Up to 512 characters. |
| Language | Yes | One language per template. Translations are separate templates with the same name. |
| Category | Yes | Utility, marketing, or authentication. See [Template categories](/docs/whatsapp/key-concepts#template-categories). |
| Header | No | A short title, up to 60 characters, with at most one variable. |
| Body | Yes | The message, up to 1,024 characters, with any number of variables. |
| Footer | No | A short line, up to 60 characters, without variables. |
| Buttons | No | Quick replies, a link to your website, or a phone number to call. |

Formatting such as `*bold*`, `_italic_`, and `~strikethrough~` works in the body, as in any WhatsApp chat.

## Create a template

### Open the template form

Open **Messaging → WhatsApp**, go to the **Templates** tab, and select **Create template**.

### Describe the template

Choose the **WhatsApp account** of the number that will send it, then enter a **Template name**, a **Category** (utility or marketing), and a **Language**.

### Write the content

Write the **Body**, and optionally a **Header** and **Footer**. Select **Add variable** to insert `{{1}}`, `{{2}}`, and so on where a value changes for each recipient. The preview shows the message as customers will see it.

### Give examples

Enter a realistic example for each variable, such as `Amina` for a name or `A-1234` for an order number. WhatsApp uses them to review the template; they are never sent.

### Submit it for review

Select **Submit for review**. The template appears with the status **Pending** until WhatsApp decides.

To add buttons or named variables, create the template in [WhatsApp Manager](https://business.facebook.com/wa/manage/message-templates/), then select **Sync templates** to bring it into Nexiom Connect.

> [!NOTE]
> Authentication templates always include a copy-code or one-tap button, which Nexiom Connect can't send yet. WhatsApp requires one-time codes to be sent with authentication templates, so don't put codes in utility or marketing templates.

## Bring in templates from WhatsApp Manager

Templates you create or edit in WhatsApp Manager appear in Nexiom Connect when you select **Sync templates** on the **Templates** tab. Each template keeps its WhatsApp status, and templates deleted in WhatsApp Manager can no longer be sent.

## Review and approval

WhatsApp reviews every new template, and every edit to an existing one. Most reviews take a few minutes; **some take up to 24 hours**. You don't need to refresh anything: the status changes in the dashboard as soon as WhatsApp decides.

| Status | Can be sent | What it means |
| --- | --- | --- |
| Pending | No | WhatsApp is reviewing the template. |
| Approved | Yes | WhatsApp approved the template. |
| Rejected | No | WhatsApp refused it. Open the template to read the reason, adjust it, and submit it again. |
| Paused | No | Customers reacted badly to recent messages, so WhatsApp paused the template for a few hours. |
| Disabled | No | WhatsApp disabled the template, usually after repeated pauses. Create a new one. |

When an approved template is edited in WhatsApp Manager, it can't be sent until WhatsApp approves the new version. Sending a template that is not approved returns `422` with the code `whatsapp_template_not_approved`.

### Get approved the first time

- **Say who you are and why you are writing.** "Hi {{1}}, your Acme order {{2}} has shipped" is clear; "Hi {{1}}, check this out" is not.
- **Match the category to the content.** A shipping update with a discount code is a marketing template.
- **Give realistic examples** for every variable, never placeholder text like `test` or `xxx`.
- **Don't start or end the body with a variable**, and number variables in order without gaps: `{{1}}`, `{{2}}`, `{{3}}`.
- **Avoid too many variables for the amount of text.** A body that is mostly variables looks like a way to send free-form messages, and is rejected.
- **Don't ask for sensitive data** such as full card numbers or passwords.

## Template IDs and languages

Each template name and language pair has its own **Template ID**, starting with `wat_`. Find it on the template's page, under **Details**. You choose the language of a message by choosing the Template ID: `order_update` in English and in French are two IDs.

A template belongs to one WhatsApp Business Account, so you can only send it from the sender of that account. Sending it from another sender returns `404` with the code `whatsapp_template_not_found`.

## Variables

When you send, give a value for every variable of the template's header and body, in `template.variables.header` and `template.variables.body`. Every value is a string of up to 1,024 characters. A missing or empty value, or a variable the template doesn't have, is refused with `400`.

Templates created in Nexiom Connect use numbered variables. Use the numbers as keys:

```json
{
  "template": {
    "id": "wat_example",
    "variables": {
      "body": {
        "1": "Amina",
        "2": "A-1234"
      }
    }
  }
}
```

Templates from WhatsApp Manager can also use named variables, such as `{{first_name}}`. Use the names as keys:

```json
{
  "template": {
    "id": "wat_example",
    "variables": {
      "header": {
        "order_number": "A-1234"
      },
      "body": {
        "first_name": "Amina",
        "delivery_date": "Thursday"
      }
    }
  }
}
```

A template without variables needs no `variables` field. The template's page lists its variables under **Variables**, with the part each one belongs to.

## What you can send

| Template content | Can be sent with Nexiom Connect |
| --- | --- |
| Text header, body, and footer, with variables | Yes |
| Quick reply buttons | Yes |
| Website buttons with a fixed link | Yes |
| Phone number buttons | Yes |
| Image, video, document, or location headers | Not yet |
| Website buttons whose link has a variable | Not yet |
| Copy-code, one-time password, and other button types | Not yet |

A template with content that can't be sent yet still syncs. Its page explains why it can't be sent, and sending it returns `422` with the code `whatsapp_template_not_supported`.

## Next steps

- [Sending messages](/docs/whatsapp/sending) Recipients, statuses, retries, and costs.
- [Send a message](/docs/api/messaging/send) The API reference for template sends.
- [Best practices and FAQ](/docs/whatsapp/best-practices) Keep templates healthy and customers engaged.

---

Source: https://connect.nxiom.com/docs/whatsapp/templates
