> Every page of the Heythere docs is listed in https://heythere.io/docs/llms.txt: fetch it to find a page instead of guessing its URL.

# Message templates: get WhatsApp templates approved by Meta

> Create the WhatsApp templates Meta must approve before you message a customer after 24 hours, follow their review, and send them from an automation.

Camille last wrote to her repair shop two days ago, so the shop can no longer message her freely. To tell her the bike is ready, it sends a message template: a message Meta reviews before a business sends it outside a [conversation's reply window](https://heythere.io/docs/concepts/conversations#when-does-a-conversation-s-reply-window-close-).

A workspace's templates are those of the business account its [WhatsApp connection](https://heythere.io/docs/concepts/whatsapp-connection) links. Heythere submits the templates it creates to Meta, and keeps every template of the account in sync, including those created in Meta's tools.

## What does a review state mean?

| `reviewState`    | Meaning                                                              |
| ---------------- | -------------------------------------------------------------------- |
| `pending_review` | Meta is reviewing the template.                                      |
| `approved`       | The template can be sent.                                            |
| `rejected`       | Meta refused the template; `reason` says why.                        |
| `paused`         | Meta paused the template because of its quality rating.              |
| `disabled`       | Meta disabled the template.                                          |
| `in_appeal`      | Meta is reviewing an appeal of its rejection.                        |
| `archived`       | Meta archived the unused template; unarchive it in WhatsApp Manager. |
| `unrecognized`   | Meta reports a state Heythere does not know yet.                     |

## Which rules does a template follow?

- A `name` is unique per language in the business account, and a template's `name` and `language` never change.
- A `category` is `marketing`, `utility`, or `authentication`, and Meta may move a template between `marketing` and `utility`.
- A variable is written `{{name}}`, such as `{{order_number}}`, and needs an example for Meta's review.
- A `standard` template has an optional header, a body, an optional footer, and buttons. A `carousel` template has a body and cards. An `authentication` template sends a one-time code.

A template can be edited while it is `approved`, `rejected`, or `paused`, and Meta limits how often an approved template changes.

## How does an automation send a template?

A `send_template` step names an `approved` template and gives each of its variables a value, such as `{{run.first_name}}`, and sends even after the reply window closed. A template it cannot send, such as one with a media header, fails the [run](https://heythere.io/docs/concepts/runs).

## In the API

Every operation is a REST endpoint and, unless marked REST only, an MCP tool of the same name. [The OpenAPI document](https://app.heythere.io/api/openapi.json) describes their parameters, payloads, and errors.


- `createWhatsAppMessageTemplate`: Create a WhatsApp message template. `POST /api/organizations/{organizationId}/workspaces/{workspaceId}/whatsapp/message-templates`
- `listWhatsAppMessageTemplates`: List WhatsApp message templates. `GET /api/organizations/{organizationId}/workspaces/{workspaceId}/whatsapp/message-templates`
- `getWhatsAppMessageTemplate`: Get a WhatsApp message template. `GET /api/organizations/{organizationId}/workspaces/{workspaceId}/whatsapp/message-templates/{messageTemplateId}`
- `updateWhatsAppMessageTemplate`: Update a WhatsApp message template. `PATCH /api/organizations/{organizationId}/workspaces/{workspaceId}/whatsapp/message-templates/{messageTemplateId}`
- `deleteWhatsAppMessageTemplate`: Delete a WhatsApp message template. `DELETE /api/organizations/{organizationId}/workspaces/{workspaceId}/whatsapp/message-templates/{messageTemplateId}`
