Skip to main content
Template messages are pre-approved message formats. You need them to start a new conversation, or to reach a customer outside the 24-hour service window. You send them through the same endpoint as every other message, with type: "template". This page covers the request structure and the component reference shared by every template. Each template type has its own page with complete examples.

Media headers

Text, image, video, document, and location headers.

Buttons

Dynamic URL, quick reply, and copy code buttons.

Authentication (OTP)

One-time passcode templates.

Limited-time offer

Offer banner with a per-message expiration.

Carousel

Swipeable cards with their own media and buttons.

Flow

Open a WhatsApp Flow from a template button.

Request Contact Info

Ask a customer to share their phone number.

Marketing Messages Lite

Route marketing templates through MM Lite.

Endpoint

Authentication, query parameters (mmlite, is_fake), and the response format are the same as for every other message type. See Send Message.
Create templates and wait for Meta’s approval before you send them. You can create them in the panel (Create Template) or through the Public API.

Request body

string
required
Always "whatsapp".
string
required
Recipient phone number including country code, without +, spaces, or dashes. E.g. 905321234567.
string
required
Always "template".
string
required
The name of the approved template.
string
required
The language the template was approved in. E.g. en, en_US, tr. Must exactly match the approved template.
array
Values for the template’s variables, media, and buttons. Omit it when the template has no variables, no media header, and no buttons that need values.

Component object

Parameter object

The number, order, and type of parameters must exactly match the approved template. Extra or missing parameters return a GW_001 error.

Template without variables


Template with body variables

Send one text parameter per {{n}} variable, in order.

Response

The response is the same as for every other message: isSuccess and the wamid in data.messages[0].id. See Send Message → Response.
Store the wamid. Button taps, Flow completions, and shared contacts arrive with context.id set to this value, so you can match the reply to the template you sent.