Template Message
Whatsapp message templates are pre-defined message format used to send notifications or initiate conversations with your customers. Messages can include appointment reminders, shipping information, issue resolution or payment updates. Before sending a message template, you need to create one. See Create Message Templates for Your WhatsApp Business Account for more information
To send a template message, make POST
it to /{{Channel-ID}}/messages
and attach a message template object, Whatsapp Business API supports messages of interactive type as in the list below:
Text based message templates
Media based message templates
Interactive Message Templates
A successful response includes an object with an identifier prefixed with wamid
. Use the wamid
to track your message status.
Text Based Message Templates
{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "{{Recipient-Phone-Number}}",
"type": "template",
"template": {
"name": "template-name",
"language": {
"code": "language-and-locale-code"
},
"components": [
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "text-string"
},
{
"type": "currency",
"currency": {
"fallback_value": "$100.99",
"code": "USD",
"amount_1000": 100990
}
},
{
"type": "date_time",
"date_time": {
"fallback_value": "February 25, 1977",
"day_of_week": 5,
"year": 1977,
"month": 2,
"day_of_month": 25,
"hour": 15,
"minute": 33,
"calendar": "GREGORIAN"
}
}
]
}
]
}
}
Media Based Message Templates
{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "{{Receipient-Phone-Number}}",
"type": "template",
"template": {
"name": ""template-name",
"language": {
"code": "language-and-locale-code"
},
"components": [
{
"type": "header",
"parameters": [
{
"type": "image",
"image": {
"link": "https://URL"
}
}
]
},
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "text-string"
},
{
"type": "currency",
"currency": {
"fallback_value": "VALUE",
"code": "USD",
"amount_1000": NUMBER
}
},
{
"type": "date_time",
"date_time": {
"fallback_value": "MONTH DAY, YEAR"
}
}
]
}
]
}
}
Interactive Message Templates
{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "PHONE_NUMBER",
"type": "template",
"template": {
"name": "template_name",
"language": {
"code": "language-and-locale-code"
},
"components": [
{
"type": "header",
"parameters": [
{
"type": "image",
"image": {
"link": "http(s)://URL"
}
}
]
},
{
"type": "body",
"parameters": [
{
"type": "text",
"text": "text-string"
},
{
"type": "currency",
"currency": {
"fallback_value": "VALUE",
"code": "USD",
"amount_1000": NUMBER
}
},
{
"type": "date_time",
"date_time": {
"fallback_value": "MONTH DAY, YEAR"
}
}
]
},
{
"type": "button",
"sub_type": "quick_reply",
"index": "0",
"parameters": [
{
"type": "payload",
"payload": "PAYLOAD"
}
]
},
{
"type": "button",
"sub_type": "quick_reply",
"index": "1",
"parameters": [
{
"type": "payload",
"payload": "PAYLOAD"
}
]
}
]
}
}
Last updated