List templates
Lists the client’s templates, one per template with its assigned campaigns and channels, with pagination and filters.
Endpoint: GET /v1/templates
Parameters
Query
| Parameter | Type | Required | Description |
|---|---|---|---|
state | string | No | Status filter (APPROVED, PENDING, …). |
search | string | No | Search by name. |
category | string | No | Category filter. |
lang | string | No | Language filter. |
did | string | No | DID filter. |
name | string | No | Exact name. |
template_meta_id | string | No | Meta template ID. |
active | boolean | No | Active/inactive filter. |
deleted | boolean | No | Deletion state. true → only deleted templates. false or omitted → excludes deleted. |
campaign_name | string | No | Exact campaign name (allows fetching Unassigned). |
fields | string | No | Fields to return per template (CSV). Whitelist: id, waba_id, client_id, active, namespace, meta_template, channel_campaigns. Omitted returns all. |
size / limit | number | No | Page size. |
page | number | No | Page number. |
client_id | number | Conditional | Client whose templates are listed. |
channel_ids | string | No | Channel filter (CSV). |
quality_scores | string | No | Quality filter (CSV). |
Request
curl --request GET \
--url 'https://api.chattigo.com/v1/templates?fields=id,waba_id,namespace,meta_template,channel_campaigns&size=10&page=1' \
--header 'Authorization: Bearer <token>'Response
Success (200)
{
"data": [
{
"id": "664a1b2c3d4e5f6000000001",
"active": true,
"client_id": 1001,
"namespace": "abc_123",
"waba_id": "123456789012345",
"meta_template": {
"id": "7890123456789012",
"name": "welcome",
"language": "es",
"status": "APPROVED",
"category": "UTILITY",
"components": [{ "type": "BODY", "text": "Hola {{1}}" }],
"quality_score": { "score": "HIGH" }
},
"channel_campaigns": [
{
"campaign_id": 123,
"campaign_name": "Camp 1",
"channels": [
{ "channel_id": 456, "did": "5731...", "type": "WHATSAPP" }
]
}
]
}
],
"total": 1,
"page": 1,
"pageSize": 20,
"paging": null
}total, page and pageSize are always returned regardless of the fields filter. Templates with no assigned campaign are returned with channel_campaigns: [].
Direct-message templates: the regular listing excludes templates with
isDirectMessage: true. Only regular templates are returned (isDirectMessageset tofalseor absent).
Empty fields omitted: within
meta_template, fields that do not apply are omitted from the response:examplewhen empty ({}),format/text/buttonswhen null, andprevious_category,quality_scoreandrejected_reasonwhen empty. Example: a BODY-only template with no rejection does not includerejected_reasoninmeta_template.
Errors
| Code | Case |
|---|---|
400 | agent without campaigns (token without BSP_CN and no campaigns) |
400 | client_id is required (token with BSP_CN without client_id) |
400 | invalid client_id: <value> (the client_id value is not numeric) |
403 | BSP_CN permission required for cross-client access (token without BSP_CN sending a client_id different from its own token) |