Text template blocks
A text template can contain a header, body, footer and buttons.
Header
Headers are optional elements found at the top of template messages. They can include text, media (such as images, videos, and documents), or locations.
Example:
Body
Body components are mandatory for all templates and consist solely of text. Each template is limited to a single body component.
Example
Footer
Footers are optional components made up of text that appear directly below the body component. Each template can include only one footer component.
Example
Basic text template example
Buttons
Buttons are optional interactive elements that trigger specific actions when tapped. Templates can include a maximum of 10 button components, but there are restrictions on the number of individual button types and combinations.
Action buttons
Buttons that perform an action when tapped by the app user such as opening a URL or calling a phone number
Copy code button
Each template is restricted to a single copy code button.
When the copy code action is added, the Body block must also contain the same variable: {{code}}
Phone number button
When tapped by the end user, phone number buttons dial the designated business phone number. Each template is restricted to a single phone number button.
Link button
When tapped by the end user, URL buttons open the specified URL in the device's default web browser. Each template is limited to two URL buttons.
Quick reply buttons
Quick reply buttons are customisable, text-based options that send an immediate response to you with the predefined message when tapped by a user.
Each template can include up to 10 quick reply buttons.
Payload contains the text that is being returned when the user taps on it.
Combining buttons and ordering
When combining quick reply buttons with other types of buttons, they must be separated into two distinct groups: quick reply buttons and non-quick reply buttons. If they are not properly grouped, the API will return an error due to an invalid button combination.
Valid groupings include:
Quick Reply, Quick Reply
Quick Reply, Quick Reply, URL, Phone
URL, Phone, Quick Reply, Quick Reply
Invalid groupings include:
Quick Reply, URL, Quick Reply
URL, Quick Reply, URL
Ordering
The order of the button types must be followed correctly for successful block object creation and submission; otherwise, the API will return a validation error. Here is the correct order when combining various buttons type.
"type":"copy-code-action"
"type": "link-action"
"type": "call-phone-number-action"
"type": "reply-action"
Limitations
Last updated