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.
The template object
Section titled “The template object”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.
product_carousel object
Only on a product card carousel: every card’s one button, as it was
made (product_carousel on create), and how many products a send
takes in template.products.skus, one per card.
Show 3 child attributesHide child attributes
product_carousel.button object
Show 4 child attributesHide child attributes
product_carousel.button.type string
QUICK_REPLY, URL, PHONE_NUMBER or COPY_CODE, or another
type of a template made in the app, such as SPM and MPM (a
product template’s view button, sent with template.products).
Open: values may be added.
product_carousel.button.text string
product_carousel.button.url string
The link of a URL button. A {{1}} at the end is a variable.
product_carousel.button.phone_number string
product_carousel.min_products integer
product_carousel.max_products integer
created_at string · date-time
updated_at string · date-time