Create a message template
Creates a WhatsApp message template under a connected Business Account and submits it to Meta for review. Use it when outbound content must be sent outside the 24-hour customer service window. Approval typically takes from a few minutes to a few hours; poll the template until template_status becomes approved, then send it through Send a message.
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.
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"
}Changes
Changed in 6 of the 137 revisions of this API.34
- ○
endpoint added
endpoint-added
- ○
- ▲
api path removed without deprecation
api-path-removed-without-deprecation
This revision also has 42 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲
- ○
endpoint added
endpoint-added
- ○
- ▲
api path removed without deprecation
api-path-removed-without-deprecation
This revision also has 42 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲
- ▲
removed the success response with the status
200response-success-status-removed
- ○
added the success response with the status
201response-success-status-added
- ▲
- ○
endpoint added
endpoint-added
This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
Of the 137 revisions, 3 have a changelog that could not be searched.