Sendexa LogoDocs

Message Templates

Create, manage, and send pre-approved WhatsApp message templates to initiate conversations and run campaigns at scale.

Pre-approved Templates

Use Meta-approved message templates to initiate conversations outside the 24-hour window

Dynamic Variables

Personalise messages with custom parameters — names, order numbers, dates, and more

Multi-language Support

Manage templates in multiple languages to reach your global audience

Category Management

Organise templates by category: MARKETING, UTILITY, and AUTHENTICATION

Review Time

24-48h

Meta approval window

Max Templates

250

per WhatsApp account

Languages

70+

supported locales

Categories

3

Marketing, Utility, Auth

GET
/v1/whatsapp/templates
List
Stable

Response

JSON
{
"success": true,
"data": {
"templates": [
{
"id": "tpl_wa_abc123",
"name": "order_confirmation",
"status": "APPROVED",
"category": "UTILITY",
"language": "en",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Order Confirmed"
},
{
"type": "BODY",
"text": "Hi {{1}}, your order {{2}} has been confirmed."
},
{
"type": "FOOTER",
"text": "Sendexa Commerce"
}
],
"createdAt": "2024-01-10T08:00:00Z",
"updatedAt": "2024-01-11T12:00:00Z"
}
],
"total": 12,
"page": 1,
"pageSize": 20
}
}
POST
/v1/whatsapp/templates
Create
Stable

Request Body

application/json
JSON
{
"name": "order_confirmation",
"category": "UTILITY",
"language": "en",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Order Confirmed ✅"
},
{
"type": "BODY",
"text": "Hi {{1}}, your order {{2}} has been placed. Total: {{3}}. We'll notify you when it ships."
},
{
"type": "FOOTER",
"text": "Sendexa Commerce"
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "URL",
"text": "Track Order",
"url": "https://yourstore.com/orders/{{1}}"
}
]
}
]
}

Response

JSON
{
"success": true,
"message": "Template submitted for review",
"data": {
"id": "tpl_wa_xyz789",
"name": "order_confirmation",
"status": "PENDING",
"category": "UTILITY",
"language": "en",
"submittedAt": "2024-01-15T10:30:00Z",
"estimatedApproval": "2024-01-17T10:30:00Z"
}
}

Template Statuses

StatusDescription
PENDING
Submitted and awaiting Meta review
APPROVED
Approved and ready to use
REJECTED
Rejected — review feedback and resubmit
DISABLED
Temporarily disabled due to quality issues

Try It Yourself

POST
https://api.sendexa.co/v1/whatsapp/templates

Code Examples

Bash
# List all templates
curl -X GET 'https://api.sendexa.co/v1/whatsapp/templates' \
-H 'Authorization: Basic YOUR_DASHBOARD_BASE64_TOKEN'
# Create a new template
curl -X POST 'https://api.sendexa.co/v1/whatsapp/templates' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_DASHBOARD_BASE64_TOKEN' \
-d '{
"name": "order_confirmation",
"category": "UTILITY",
"language": "en",
"components": [
{ "type": "BODY", "text": "Hi {{1}}, your order {{2}} is confirmed." }
]
}'

HTTP Status Codes

CodeStatusDescription
200OKRequest successful
201CreatedTemplate created and under review
400Bad RequestInvalid template format or missing fields
401UnauthorizedInvalid or missing API credentials
404Not FoundTemplate not found
409ConflictTemplate with this name already exists
DELETE
/v1/whatsapp/templates/{id}
Delete
Stable

Path Parameter

ParameterTypeDescription
idstringThe template ID returned when the template was created (e.g. tpl_wa_abc123)

Response

JSON
{
"success": true,
"message": "Template deleted successfully",
"data": {
"id": "tpl_wa_abc123",
"name": "order_confirmation",
"deletedAt": "2024-01-20T09:00:00Z"
}
}

Code Examples

Bash
curl -X DELETE 'https://api.sendexa.co/v1/whatsapp/templates/tpl_wa_abc123' \
-H 'Authorization: Basic YOUR_DASHBOARD_BASE64_TOKEN'