WhatsApp Templates
Create a message template
Creates a message template and submits it to Meta for review. Approval typically takes from a few minutes to a few hours; poll the template's template_status until it becomes approved.
Permissions
The API token used to authenticate must have the following scope(s) enabled to make a successful request: Numbers.
Learn more about API scopes.
post/api/messaging/whatsapp/templates
Request body
Example request
{
"name": "order_update",
"language": "en_US",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Order Update for {{1}}",
"example": {
"header_text": [
"Jane Smith"
]
}
},
{
"type": "BODY",
"text": "Your order {{1}} is currently {{2}}.",
"example": {
"body_text": [
[
"ORD-9821",
"out for delivery"
]
]
}
},
{
"type": "FOOTER",
"text": "Thank you for shopping with us."
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "QUICK_REPLY",
"text": "Track Order"
},
{
"type": "URL",
"text": "Contact Support",
"url": "https://example.com/support"
}
]
}
]
}Response
Response returned when a template is successfully created and submitted to Meta.
Example response
{
"name": "order_update",
"components": [
{
"type": "BODY"
}
],
"language": "en_US",
"template_id": "1164792772433648",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"discarded_at": "2024-01-15T10:30:00Z"
}