Create template
POST/templates
Creates a template on Meta. It starts as PENDING and approval takes minutes to
hours — the result arrives through the message_template_status_update webhook.
Before sending it to Meta we validate the components locally and return
422 invalid_request with an issues field pointing at the problem. That avoids
the slow submit-wait-rejected cycle.
What gets validated
- Variables with no declared example
- Examples with an empty value
- Gaps in positional numbering (
{{1}},{{3}}with no{{2}}) - Mixing positional and named formats in one template
- More than one variable in a text header
- Any variable in the footer
- A URL button with a variable and no example URL
- An invalid identifier in a named variable
- A declared
parameterFormatthat contradicts the text
From Meta's template library
Instead of components you may send libraryTemplateName with the name of an
item from GET /templates/library. The copy is then Meta's and goes through no
validation of ours — what you fill in is only what the item asks for (button
URL, phone number). The two paths are mutually exclusive: sending both is 422.
Request
Responses
- 201
- 401
- 403
- 409
- 422
- 429
Template created, waiting for approval.
Missing, malformed, unknown or revoked token (authentication), or a suspended
account (tenant_inactive).
The resource does not belong to your account (forbidden), or the path is on the
mirror's block list (forbidden_endpoint), or your API key is limited to some numbers and
the operation covers the whole account (forbidden).
No WhatsApp Business Account connected and wabaId omitted (no_waba).
Payload failed validation (invalid_request, detailed in issues) or was
rejected by Meta (meta_error, with the original body in meta).
Rate limit exceeded (rate_limit).
Response Headers
Seconds to wait before retrying.
Which rate limit category applied — send, media or default.
Which bucket the other headers describe — key (the API key), session (the dashboard) or account (the account ceiling).
Request ceiling for this category in the current window.
Requests left in the current window.