Skip to main content

List WhatsApp Templates

GET /templates

List all WhatsApp message templates available for your account. Use the template id when sending template messages via the Send Message endpoint.

Templates are synced from Meta and can be filtered by status or category.

Query Parameters

ParameterTypeDescription
statusstringFilter by template status: APPROVED, PENDING, REJECTED
categorystringFilter by template category: MARKETING, UTILITY, AUTHENTICATION

Examples

List all approved templates

curl "https://api.getnexor.ai/api/public/templates?status=APPROVED" \
-H "X-API-Key: nxr_live_your_api_key"

List all templates

curl https://api.getnexor.ai/api/public/templates \
-H "X-API-Key: nxr_live_your_api_key"

Responses

200 — Successful response

{
"success": true,
"templates": [
{
"id": "36668f64-be99-4f8d-a3a0-ebb4052b1607",
"name": "meeting_global_with_name",
"language": "es",
"category": "UTILITY",
"status": "APPROVED",
"components": [
{
"type": "BODY",
"text": "Hola {{1}}, soy {{2}} tu asesora. Tu reunion esta agendada para el {{3}} a las {{4}}. Link: {{5}}",
"example": {
"body_text": [["John", "Maria", "15 de enero", "3:00 PM", "https://meet.google.com/abc"]]
}
}
],
"variables": [
{ "name": "nombre", "position": 1, "component": "BODY" },
{ "name": "agentname", "position": 2, "component": "BODY" },
{ "name": "fecha", "position": 3, "component": "BODY" },
{ "name": "hora", "position": 4, "component": "BODY" },
{ "name": "link_reunion", "position": 5, "component": "BODY" }
]
}
]
}

Response Fields — Template

FieldTypeDescription
idstring (uuid)Template ID. Use this as template_id when sending messages
namestringTemplate name as registered in Meta
languagestringLanguage code (e.g., es, en)
categorystringMARKETING, UTILITY, or AUTHENTICATION
statusstringAPPROVED, PENDING, or REJECTED
componentsarrayTemplate structure (header, body, footer, buttons) in Meta format
variablesarray | nullNamed variable mappings. Use these to build the components array when sending

401 — Authentication error

See Authentication.

500 — Internal server error