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
Query Parameters
Pagination cursor returned by the previous response (
paging.cursors.after) to fetch the next page.Response
Array of template objects from Meta.
Mostrar Template object
Mostrar Template object
Error Codes
400 Bad Request— Missingchannel_idor channel is not WABA type, or Meta rejected the request (messagecarries the reason Meta gave, for example an expired channel token or a re-engagement window that closed)401 Unauthorized— Invalid or missing API key429 Too Many Requests— Meta rate limit; retry after a pause500 Internal Server Error— Server-side error502 Bad Gateway— Meta API unavailable; safe to retry
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"
}
}
}
