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

# Templates

> Distinguish Meta pagination from the gateway template cache.

## Read from Meta

Use `GET /v1/templates?wabaId=...` or `GET /v1/templates/{wabaId}`. Each call returns one page. Send `paging.after` as `after` for the next page; stop when there is no cursor. Meta's `next` and `previous` URLs are not returned.

## Use the cache

`GET /v1/message-templates` reads cached templates, optionally filtered by `wabaId`, without calling Meta. The contract returns up to 500, ordered by WABA, name and language.

`POST /v1/message-templates/sync` accepts `{"wabaId":"WABA_ID"}` and replaces that WABA's cache from Meta.

## Create a template

`POST /v1/message-templates` requires `wabaId`, `name`, `language`, `category` and `components`. Categories are `MARKETING`, `UTILITY` and `AUTHENTICATION`. Use Meta's component structure.

Creation submits the template for Meta review and caches the response. It does not imply approval. Before a [broadcast](https://docs.watahub.dev/en/broadcasts.md), sync and verify the selected name and language are cached as `APPROVED`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.