curl -X GET "https://api.contactship.ai/v1/waba/templates?channel_id=chn_abc123" \
-H "x-api-key: your-api-key"
curl -X GET "https://api.contactship.ai/v1/waba/templates?channel_id=chn_abc123&limit=10&after=CURSOR_HERE" \
-H "x-api-key: your-api-key"
const channelId = 'chn_abc123';
const response = await fetch(
`https://api.contactship.ai/v1/waba/templates?channel_id=${channelId}`,
{ headers: { 'x-api-key': 'your-api-key' } }
);
const result = await response.json();
const approved = result.data.filter(t => t.status === 'APPROVED');
console.log(`${approved.length} approved templates`);
import requests
response = requests.get(
'https://api.contactship.ai/v1/waba/templates',
headers={'x-api-key': 'your-api-key'},
params={'channel_id': 'chn_abc123'},
)
result = response.json()
for template in result['data']:
print(f"{template['name']} ({template['language']}) — {template['status']}")
{
"success": true,
"data": [
{
"id": "1234567890",
"name": "primer_contacto_v1",
"language": "es",
"status": "APPROVED",
"category": "MARKETING",
"components": [
{
"type": "BODY",
"text": "Hola {{1}}, te contactamos porque te registraste {{2}}. ¿Tienes un momento?",
"example": {
"body_text": [["Juan Pérez", "ayer"]]
}
},
{
"type": "FOOTER",
"text": "Responde STOP para no recibir más mensajes"
}
]
},
{
"id": "0987654321",
"name": "seguimiento_cotizacion",
"language": "es",
"status": "APPROVED",
"category": "UTILITY",
"components": [
{
"type": "BODY",
"text": "Hola {{1}}, tu cotización #{{2}} está lista. ¿Deseas revisarla?"
}
]
}
],
"paging": {
"cursors": {
"before": "MAZDZD",
"after": "MjQZD"
}
}
}
WhatsApp (WABA)
Get WhatsApp Templates
List approved WhatsApp message templates for a channel
GET
/
v1
/
waba
/
templates
curl -X GET "https://api.contactship.ai/v1/waba/templates?channel_id=chn_abc123" \
-H "x-api-key: your-api-key"
curl -X GET "https://api.contactship.ai/v1/waba/templates?channel_id=chn_abc123&limit=10&after=CURSOR_HERE" \
-H "x-api-key: your-api-key"
const channelId = 'chn_abc123';
const response = await fetch(
`https://api.contactship.ai/v1/waba/templates?channel_id=${channelId}`,
{ headers: { 'x-api-key': 'your-api-key' } }
);
const result = await response.json();
const approved = result.data.filter(t => t.status === 'APPROVED');
console.log(`${approved.length} approved templates`);
import requests
response = requests.get(
'https://api.contactship.ai/v1/waba/templates',
headers={'x-api-key': 'your-api-key'},
params={'channel_id': 'chn_abc123'},
)
result = response.json()
for template in result['data']:
print(f"{template['name']} ({template['language']}) — {template['status']}")
{
"success": true,
"data": [
{
"id": "1234567890",
"name": "primer_contacto_v1",
"language": "es",
"status": "APPROVED",
"category": "MARKETING",
"components": [
{
"type": "BODY",
"text": "Hola {{1}}, te contactamos porque te registraste {{2}}. ¿Tienes un momento?",
"example": {
"body_text": [["Juan Pérez", "ayer"]]
}
},
{
"type": "FOOTER",
"text": "Responde STOP para no recibir más mensajes"
}
]
},
{
"id": "0987654321",
"name": "seguimiento_cotizacion",
"language": "es",
"status": "APPROVED",
"category": "UTILITY",
"components": [
{
"type": "BODY",
"text": "Hola {{1}}, tu cotización #{{2}} está lista. ¿Deseas revisarla?"
}
]
}
],
"paging": {
"cursors": {
"before": "MAZDZD",
"after": "MjQZD"
}
}
}
Returns the list of approved WhatsApp Business message templates available for a given channel. Use template names from this endpoint when calling Send WhatsApp Template.
Headers
string
requerido
Your API key for authentication.
Query Parameters
string
requerido
UUID of the WABA channel to fetch templates for.
number
predeterminado:"25"
Maximum number of templates to return.
string
Pagination cursor returned by the previous response (
paging.cursors.after) to fetch the next page.Response
boolean
true on success.array
Array of template objects from Meta.
Mostrar Template object
Mostrar Template object
string
Meta’s internal template ID.
string
Template name (use this in
template_name when sending).string
Language code of the template (e.g.
es, en_US).string
Approval status:
APPROVED, PENDING, REJECTED.string
Template category:
MARKETING, UTILITY, AUTHENTICATION.array
Template component definitions (HEADER, BODY, FOOTER, BUTTONS).
object
Error Codes
400 Bad Request— Missingchannel_idor channel is not WABA type401 Unauthorized— Invalid or missing API key500 Internal Server Error— Meta API error
Code Examples
curl -X GET "https://api.contactship.ai/v1/waba/templates?channel_id=chn_abc123" \
-H "x-api-key: your-api-key"
curl -X GET "https://api.contactship.ai/v1/waba/templates?channel_id=chn_abc123&limit=10&after=CURSOR_HERE" \
-H "x-api-key: your-api-key"
const channelId = 'chn_abc123';
const response = await fetch(
`https://api.contactship.ai/v1/waba/templates?channel_id=${channelId}`,
{ headers: { 'x-api-key': 'your-api-key' } }
);
const result = await response.json();
const approved = result.data.filter(t => t.status === 'APPROVED');
console.log(`${approved.length} approved templates`);
import requests
response = requests.get(
'https://api.contactship.ai/v1/waba/templates',
headers={'x-api-key': 'your-api-key'},
params={'channel_id': 'chn_abc123'},
)
result = response.json()
for template in result['data']:
print(f"{template['name']} ({template['language']}) — {template['status']}")
{
"success": true,
"data": [
{
"id": "1234567890",
"name": "primer_contacto_v1",
"language": "es",
"status": "APPROVED",
"category": "MARKETING",
"components": [
{
"type": "BODY",
"text": "Hola {{1}}, te contactamos porque te registraste {{2}}. ¿Tienes un momento?",
"example": {
"body_text": [["Juan Pérez", "ayer"]]
}
},
{
"type": "FOOTER",
"text": "Responde STOP para no recibir más mensajes"
}
]
},
{
"id": "0987654321",
"name": "seguimiento_cotizacion",
"language": "es",
"status": "APPROVED",
"category": "UTILITY",
"components": [
{
"type": "BODY",
"text": "Hola {{1}}, tu cotización #{{2}} está lista. ¿Deseas revisarla?"
}
]
}
],
"paging": {
"cursors": {
"before": "MAZDZD",
"after": "MjQZD"
}
}
}
⌘I
