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

# Official Meta templates

> Sync Meta templates with Notifique, link channels, and send on the official WhatsApp line.

<Tip>
  An official template is a **Meta-approved form letter**. In Notifique it can live alongside SMS, email, and other channels in the **same** template, no duplicate per channel.
</Tip>

## In brief

* On the **official line**, outside the 24h window, only **Meta-approved** templates can start or resume a conversation.
* There are **internal** (`ZENVIO`) and **official** (`WHATSAPP_OFFICIAL`) templates mirrored on the WABA.
* You can **pull from Meta**, **link** to an existing internal template, or **publish** an internal one to Meta and wait for approval.
* Meta notifies status changes; Notifique propagates via **`template.*`** webhooks.

Official instance: [WhatsApp Quick Start](/en/whatsapp-api/como-funciona/quick-start) (**Official connection** tab). Overview: [Templates introduction](/en/template-api/como-funciona/introducao).

***

## Why this matters

On the **official** line, Meta splits the conversation into two moments:

| Situation                                | What to send            |
| ---------------------------------------- | ----------------------- |
| Customer **replied** within the last 24h | Free-form text or media |
| **First contact** or stale conversation  | **Approved** template   |

On the **unofficial** line, use internal templates or free-form text. Details: [Connection modes](/en/whatsapp-api/como-funciona/modos-de-conexao).

***

## Internal × official in Notifique

A Notifique template is a **folder** with one block per channel.

|             | **Internal**           | **Official (Meta)**                              |
| ----------- | ---------------------- | ------------------------------------------------ |
| `source`    | `ZENVIO` (or null)     | `WHATSAPP_OFFICIAL`                              |
| Typical use | **Unofficial** line    | **Official** line                                |
| Approval    | Immediate in Notifique | Meta: `PENDING` → `APPROVED`                     |
| Meta fields | ,                      | `metaId`, `metaName`, `metaWabaId`, `components` |

<Info>
  **Internal name** (`order_alert`) may differ from **`metaName`** on Meta (`order_update`). On official send, Meta validates the **approved** model in its catalog.
</Info>

***

## One template, multiple channels

Example: you already have `order_confirmation` with SMS and email. On the official line, **link** WhatsApp to an approved Meta model.

* SMS and email **unchanged**
* WhatsApp block uses **official** approved structure
* One `POST /v1/templates/send` dispatches all enabled channels

Variables and CRUD: [Variables and CRUD](/en/template-api/como-funciona/variaveis-disponiveis-e-crud).

***

## Sync: three paths

Requires an **active official** instance. Dashboard: instance → **Sync templates with Meta**.

<AccordionGroup>
  <Accordion title="A, Pull from Meta (sync)">
    Use when templates **already exist** on the Business account.

    1. Click **Sync templates with Meta**
    2. Dashboard lists Meta catalog and local templates
    3. For each Meta model, choose **Link** to internal or **Create new**
    4. Confirm sync

    **Link effect:** local template becomes official on WhatsApp, stores `metaId`, `metaName`, and `components`, and **keeps** SMS/email/other channels.
  </Accordion>

  <Accordion title="B, Link internal to Meta model">
    Most common when you **already have** Notifique templates.

    1. Run sync (path **A**)
    2. In mapping, associate each Meta model with the right internal template
    3. Save

    Internal name stays. Official WhatsApp send uses **Meta-approved** content. Syncing on any official number on the same WABA updates the workspace catalog.
  </Accordion>

  <Accordion title="C, Publish internal to Meta (submit for approval)">
    Use when the model **starts in Notifique** and **does not exist** on Meta yet.

    1. Create or edit template (official structure: header, body, buttons…)
    2. On official instance: **Send to Meta** / **Publish to Meta**
    3. Meta receives with **PENDING** status
    4. When approved → **APPROVED**, you can send

    <Warning>
      **APPROVED** templates: up to **1 edit every 24h** and **10 in 30 days** on Meta. If auto-push fails, use **Update on Meta…** in the editor.
    </Warning>
  </Accordion>
</AccordionGroup>

***

## Approval, status, and webhooks

Track in dashboard or automate with webhooks:

| Status     | Meaning                     |
| ---------- | --------------------------- |
| `PENDING`  | Meta reviewing              |
| `APPROVED` | Can send on official line   |
| `REJECTED` | Rejected, fix and republish |
| `PAUSED`   | Paused for quality          |

| Webhook event               | When it fires                               |
| --------------------------- | ------------------------------------------- |
| `template.submitted`        | Template submitted/published to Meta        |
| `template.status_changed`   | Local status changes                        |
| `template.category_changed` | Category changes (e.g. MARKETING ↔ UTILITY) |

Payload guide: [Webhook events](/en/template-api/como-funciona/eventos-do-webhooks).

For **message delivery** (sent, delivered, read, failed), use [WhatsApp webhooks](/en/whatsapp-api/como-funciona/eventos-do-webhooks), **`message.*`** events, not `template.*`.

***

## Send an official template

**Prerequisites:**

1. Official instance **active** and Meta payment OK
2. Template **APPROVED** with `source: WHATSAPP_OFFICIAL`
3. `metaName` filled (run sync/link if empty)

**Multi-channel** (WhatsApp + SMS):

```http theme={null}
POST /v1/templates/send
Content-Type: application/json
Authorization: Bearer sk_live_xxxxx
```

```json theme={null}
{
  "template": "order_confirmation",
  "channels": ["whatsapp", "sms"],
  "to": ["5511999999999"],
  "variables": { "code": "482910", "name": "Maria" },
  "instanceId": "OFFICIAL_INSTANCE_ID"
}
```

Expected response: **202**

```json theme={null}
{
  "success": true,
  "data": {
    "messageIds": ["clxx789..."],
    "smsIds": ["clxx790..."],
    "status": "QUEUED",
    "count": 2
  }
}
```

<Note>
  With **`sk_test_`**, Meta gates **do not** run, simulated send in [Sandbox](/en/guides/sandbox/index). Real approval and conversation billing only with **`sk_live_`**.
</Note>

***

## Which instance accepts which template?

| Instance       | WhatsApp templates                          |
| -------------- | ------------------------------------------- |
| **Official**   | Official (`WHATSAPP_OFFICIAL`) **APPROVED** |
| **Unofficial** | Internal (`ZENVIO`), simple text/image      |

Meta buttons, header, or carousel **do not work** on the unofficial line.

***

## Common errors

| Code                                        | Meaning                      | What to do                                   |
| ------------------------------------------- | ---------------------------- | -------------------------------------------- |
| `META_TEMPLATE_REQUIRED`                    | Outside 24h without template | Send approved template or wait for reply     |
| `META_TEMPLATE_NOT_FOUND`                   | Name/language mismatch       | Sync/link; check `metaName`                  |
| `TEMPLATE_NOT_ALLOWED_FOR_INSTANCE`         | Template mode ≠ instance     | Official on official; internal on unofficial |
| `META_PAYMENT_METHOD_REQUIRED`              | No card on Meta account      | Add billing in WhatsApp Manager              |
| `META_TOKEN_EXPIRED` / `META_TOKEN_INVALID` | Official line disconnected   | Reconnect instance                           |

Catalog: [Error responses](/en/guides/conceitos/resposta-de-erros) (**Meta Cloud / official templates** accordion).

***

## Next steps

* [Quick Start](/en/template-api/como-funciona/quick-start): multi-channel dispatch
* [Webhook events](/en/template-api/como-funciona/eventos-do-webhooks): `template.*`
* [Connection modes](/en/whatsapp-api/como-funciona/modos-de-conexao): official × unofficial
* [WhatsApp events](/en/whatsapp-api/como-funciona/eventos-do-webhooks): `message.*` delivery
