Skip to main content
A WhatsApp template is a message that Meta reviews before you can send it. You need a template to write to a customer after the 24-hour window closes, or to write first. Templates belong to the WhatsApp Business Account of the tenant, so the tenant needs a connected number first. Without one, the calls answer 400 WhatsApp is not connected. When the tenant has more than one number, add phone_number_id to pick the account. Without it, the first connected number is used. Read calls need the channels:read scope. The other calls need channels:write.

List templates

The call reads the templates again from Meta, then lists them. limit sets how many to return. The default is 100.
GET /api/v1/partner/tenants/{external_ref}/templates/{name}/ returns the template in every language.

Create a template

name, category and language are required. Send either components as Meta defines them, or body_text with the optional header_text, footer_text and example_body_params. The answer is 201:
Meta reviews the template. The result comes later as the event template.status_changed. See WhatsApp events. A refusal by Meta answers { "ok": false, "error": ... } with the reason.

Change or delete a template

PATCH /api/v1/partner/tenants/{external_ref}/templates/{name}/ sends new components, and optionally category, to Meta for review. Send language when the template exists in more than one language. Without it the call answers 400. DELETE removes the template in every language.

Media in a header

A template can have an image, video or document header. Meta needs a sample file for the review. Upload it first, as multipart form data with file and header_type.
The answer is 201 { "handle", "mime", "size" }. Use the handle in the header component of the template.

Send a template

Send a template with the message routes in Conversations: set type to template, and send template_name, lang and body_params.