Send a single or multiple template messages to one or more recipients. Template messages can be sent and delivered at anytime. Each template needs to be registered and pre-approved by WhatsApp. The API response will not contain the final delivery status, use Delivery Reports instead.
Registered WhatsApp sender number. Must be in international format and comply with WhatsApp's requirements.
to
required
string [ 1 .. 24 ] characters
Message recipient number. Must be in international format.
messageId
string [ 0 .. 100 ] characters
The ID that uniquely identifies the message sent.
content
required
object
The content object to build a message that will be sent.
templateName
required
string [ 1 .. 512 ] characters
Template name. Should only contain lowercase alphanumeric characters and underscores.
templateData
required
object
Template data. Values have to be set as registered in the template.
body
required
object
Template body.
placeholders
required
Array of strings
Template's parameter values submitted in the same order as in the registered template. The value must not be null, but it can be an empty array, if the template was registered without placeholders. Values within the array must not be null or empty.
header
object
Template header. Should be defined, only if placeholders or media have been registered in the template's header.
type
required
string
TEXT
placeholder
required
string
Value of a placeholder in the text header.
buttons
Array of objects
Template buttons. Should be defined in the correct order, only if quick reply, dynamic URL, copy code or flow buttons have been registered. It can have up to ten buttons including a maximum of two dynamic URL buttons and one copy code button. When flow, catalog, multi product or order details button is used it needs to be the only button.
Array
type
required
string
QUICK_REPLY
parameter
required
string [ 1 .. 128 ] characters
Payload of a quick reply button.
carousel
object
Template carousel. Should be defined only when template contains carousel.
cards
required
Array of objects [ 1 .. 10 ] items
Carousel cards. Should be defined in the correct order. It can have between one and ten cards.
Array
header
required
object
Template header. Should be defined, only if placeholders or media have been registered in the template's header.
type
required
string
TEXT
placeholder
required
string
Value of a placeholder in the text header.
body
object
Template body.
placeholders
required
Array of strings
Template's parameter values submitted in the same order as in the registered template. The value must not be null, but it can be an empty array, if the template was registered without placeholders. Values within the array must not be null or empty.
buttons
Array of objects [ 1 .. 2 ] items
Card buttons. Should be defined in the correct order, only if quick reply or dynamic URL buttons have been registered.
Array
type
required
string
QUICK_REPLY
parameter
required
string [ 1 .. 128 ] characters
Payload of a quick reply button.
limitedTimeOffer
object
Template limited-time offer. Should be defined, only if template contains limited-time offer.
expirationTime
required
string <date-time>
Offer code expiration time. Has the following format: yyyy-MM-dd'T'HH:mm:ss.SSSZ.
language
required
string
The code of language or locale to use. Must be the same code used when registering the template.
callbackData
string [ 0 .. 4000 ] characters
Custom client data that will be included in a Delivery Report.