Templates
Message template management. Templates belong to the WABA (business account),
not to a number — use GET /me to find your waba_id.
Local mirror and syncing
We keep a mirror of your templates so listing is instant. It is updated by webhook whenever Meta changes a template's status and, on top of that, synced on demand once it gets older than 15 minutes.
Use refresh=true to force a sync and refresh=false to serve cache only.
Variables and examples
Every template with variables has to declare examples — Meta rejects it otherwise. The rules we validate before sending:
- Positional variables (
{{1}},{{2}}) must be sequential, with no gaps. - Don't mix the positional and named (
{{name}}) formats in one template. - A text header takes at most one variable.
- The footer takes no variables.
- A URL button with a variable needs a full example URL.
List templates
Lists the WABA's templates from the local mirror. If the mirror is older than 15
Create template
Creates a template on Meta. It starts as `PENDING` and approval takes minutes to
Edit template
Replaces the components of an existing template. Only the content changes:
Remove template
Removes the template on Meta and marks the local mirror as deleted.
Upload a header sample
Uploads the sample file for a template header and returns the `handle` to use in
Search Meta's template library
Searches Meta's catalogue of ready-made templates — copy written by Meta for the
Sync templates
Reconciles the local mirror with Meta: creates what is missing, updates what