Templates API
Query approved WhatsApp message templates.
List Templates
GET/api/templates
Retrieve all approved templates with pagination.
Query Parameters
pageinteger
Page number (default: 1)
limitinteger
Results per page (default: 10)
statusstring
Filter by status: APPROVED, PENDING, REJECTED
categorystring
Filter by category: MARKETING, UTILITY, AUTHENTICATION
inbox_idstring
Filter by inbox ID
bash
curl -X GET "https://api.cekat.ai/api/templates?status=APPROVED" \
-H "Authorization: Bearer YOUR_API_KEY"
Response
200 OK
{
"success": true,
"data": [
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"name": "welcome_message",
"body": "Hello Kak, welcome to our service!",
"category": "MARKETING",
"status": "APPROVED",
"language": "id",
"type": "whatsapp",
"wa_template_id": "1234567890123456",
"inbox_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"header_type": null,
"header": null,
"footer": null,
"buttons": [],
"body_placeholder": [],
"enabled": true,
"created_at": "2026-04-08T11:59:43"
}
],
"metadata": {
"pagination": {
"total_data": 343,
"total_page": 343,
"current_page": 1
}
}
}
Template Object
| Field | Type | Description |
|---|---|---|
id | string (UUID) | Unique template identifier |
name | string | Template name |
body | string | Template body text |
category | string | MARKETING, UTILITY, or AUTHENTICATION |
status | string | APPROVED, PENDING, or REJECTED |
language | string | Language code: id, en, ms |
type | string | Template type: whatsapp |
wa_template_id | string | WhatsApp template ID |
inbox_id | string | Associated inbox ID |
header_type | string | Header type: TEXT, IMAGE, VIDEO, DOCUMENT |
header | string | Header content (nullable) |
footer | string | Footer text (nullable) |
buttons | array | Button configurations |
body_placeholder | array | Placeholder variables |
enabled | boolean | Whether template is enabled |
created_at | string | Creation timestamp |
Categories
| Category | Description |
|---|---|
MARKETING | Promotional messages |
UTILITY | Transactional updates |
AUTHENTICATION | OTP and verification codes |
Code Examples
javascript
const getTemplates = async (filters = {}) => {
const params = new URLSearchParams(filters);
const response = await fetch(
`https://api.cekat.ai/api/templates?${params}`,
{ headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }
);
return response.json();
};
// Get approved marketing templates
const marketingTemplates = await getTemplates({
status: 'APPROVED',
category: 'MARKETING'
});
console.log(`Found ${marketingTemplates.data.length} templates`);
console.log(`Total: ${marketingTemplates.metadata.pagination.total_data}`);
