Skip to main content

WhatsApp Templates

Manage the WhatsApp message templates of a workspace. Templates belong to a location (workspace) that has WhatsApp connected.

  • A new template is saved with status PENDING and submitted to Meta for review. Check status later, or watch it in Engage > WA Templates.
  • The template name may contain only letters, numbers and underscores; spaces become underscores. Each name must be unique in the location.
  • components follow Meta's template format: a BODY is required; HEADER, FOOTER and BUTTONS are optional.
  • Use the template id from this API with Send WhatsApp Template Message.
API regionapi.whautomate.com

List WhatsApp Templates​

GET /v1/whatsapp-templates
Headers
x-api-keystringrequired
Your Whautomate API key.
Query parameters
locationIdstring
searchTextstring
limitstring
pagestring
Response 200
idstring
templateobject
The template as sent to Meta: name, language, category and components.
statusstring
Meta review status, for example APPROVED, PENDING or REJECTED. Only APPROVED templates can be sent.
locationobject
createdAtstring
updatedAtstring
Request
curl -X GET "https://api.whautomate.com/v1/whatsapp-templates" \
-H "x-api-key: YOUR_API_KEY"
Response 200
[
{
"id": "string",
"template": {},
"location": {
"id": "string",
"title": "string"
},
"createdAt": "string",
"updatedAt": "string"
}
]

Get a WhatsApp Template​

GET /v1/whatsapp-templates/{templateId}
Headers
x-api-keystringrequired
Your Whautomate API key.
Path parameters
templateIdstringrequired
Response 200
idstring
templateobject
The template as sent to Meta: name, language, category and components.
statusstring
Meta review status, for example APPROVED, PENDING or REJECTED. Only APPROVED templates can be sent.
locationobject
createdAtstring
updatedAtstring
Request
curl -X GET "https://api.whautomate.com/v1/whatsapp-templates/{templateId}" \
-H "x-api-key: YOUR_API_KEY"
Response 200
{
"id": "string",
"template": {},
"location": {
"id": "string",
"title": "string"
},
"createdAt": "string",
"updatedAt": "string"
}

Create a WhatsApp Template​

POST /v1/whatsapp-templates
Headers
x-api-keystringrequired
Your Whautomate API key.
Body
locationobjectrequired
templateobjectrequired
Response 200
idstring
templateobject
The template as sent to Meta: name, language, category and components.
statusstring
Meta review status, for example APPROVED, PENDING or REJECTED. Only APPROVED templates can be sent.
locationobject
createdAtstring
updatedAtstring
Request
curl -X POST "https://api.whautomate.com/v1/whatsapp-templates" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"location": {
"id": "string"
},
"template": {
"name": "string",
"language": "string",
"category": "MARKETING",
"components": [
{
"type": "HEADER",
"format": "string",
"text": "string",
"example": {},
"buttons": [
{}
]
}
]
}
}'
Response 200
{
"id": "string",
"template": {},
"location": {
"id": "string",
"title": "string"
},
"createdAt": "string",
"updatedAt": "string"
}

Delete a WhatsApp Template​

DEL /v1/whatsapp-templates/{templateId}
Headers
x-api-keystringrequired
Your Whautomate API key.
Path parameters
templateIdstringrequired
Response 200
successboolean
Request
curl -X DELETE "https://api.whautomate.com/v1/whatsapp-templates/{templateId}" \
-H "x-api-key: YOUR_API_KEY"
Response 200
{
"success": true
}

Errors​

StatusError
400template must contain name, language, category and components
400There is an existing template with the same name, Please change the template name.
401New templates cannot be created, Please configure your whatsApp Cloud API! (WhatsApp is not connected in that location)
404Invalid locationId