Returns the message templates that were approved by Meta for the WhatsApp Business Accounts (WABA)
connected to your project. Templates are the only way to open a conversation with a contact, or to write
to a contact again once the 24 hour customer service window has expired.
Only text-only templates are returned: templates carrying buttons or a media header (image, video,
document) cannot be sent through the API and are filtered out.
Each template exposes the variables it expects in required_variables. Every one of them must be filled
in the parameters object when you send the template, otherwise the request is rejected with
whatsapp_template_missing_parameters.
Templates are created and approved in the Meta Business Manager, not through this API. Newly approved
templates appear here within a few minutes.
Example response
{
"templates": [
{
"whatsapp_template_id": 42,
"name": "order_shipped",
"language": "en_US",
"category": "utility",
"whatsapp_business_account_id": "123456789012345",
"required_variables": ["name", "order_id"],
"preview": "Hi {{name}}, your order {{order_id}} has been shipped!"
}
],
"page": 0,
"per_page": 20
}| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
401Authentication required
403Permission denied
422Validation failed