Skip to content

Templates

A template is a message format WhatsApp reviews and approves, so you can send it outside the 24-hour window. Create one, then follow WhatsApp’s review of it.

Scopes: templates:read to read, templates:write to change.

Send a template

A WhatsApp message template.

Attributes

id string · uuid

name string

language string

category string

MARKETING, UTILITY or AUTHENTICATION, as WhatsApp has it. More values may be added.

status string

Where the template is in WhatsApp’s review: DRAFT (saved here, not submitted), PENDING, APPROVED, REJECTED, PAUSED, DISABLED, IN_APPEAL, PENDING_DELETION or DELETED. More values may be added. Only APPROVED templates can be sent.

rejection_reason string · nullable

WhatsApp’s reason, while the template is REJECTED. null otherwise.

quality string

WhatsApp’s quality rating: GREEN, YELLOW, RED or UNKNOWN. More values may be added.

number_id string · uuid · nullable

The number the template is on (see GET /v1/numbers).

parameter_format string

positional templates use {{1}}, {{2}} for variables; named ones use {{name}}.

header object · nullable

The header, or null if there is none.

Show 2 child attributesHide child attributes

header.format string

TEXT, or the format of a media header (IMAGE, VIDEO, DOCUMENT) or LOCATION on a template made in the app. More values may be added.

header.text string

The header text. Only on a TEXT header.

body string

buttons array of objects

Show 4 child attributesHide child attributes

Each item:

buttons[].type string

QUICK_REPLY, URL, PHONE_NUMBER or COPY_CODE, or another type of a template made in the app. More values may be added.

buttons[].text string

buttons[].url string

The link of a URL button. A {{1}} at the end is a variable.

buttons[].phone_number string

variables object

The keys a message that sends this template must supply (see POST /v1/messages). Positional templates use "1", "2"; named ones use the names. A URL button with a variable, and a COPY_CODE button, each need "1".

Show 3 child attributesHide child attributes

variables.header array of strings

variables.body array of strings

variables.buttons object

Keys are button indexes, as strings, in the order of buttons. Each value lists that button’s variables.

A map; each value is an array of strings.

created_at string · date-time

updated_at string · date-time