Saltar al contenido principal
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"
{
  "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

x-api-key
string
requerido
Your API key for authentication.

Query Parameters

channel_id
string
requerido
UUID of the WABA channel to fetch templates for.
limit
number
predeterminado:"25"
Maximum number of templates to return.
after
string
Pagination cursor returned by the previous response (paging.cursors.after) to fetch the next page.

Response

success
boolean
true on success.
data
array
Array of template objects from Meta.
paging
object
Pagination metadata from Meta.

Error Codes

  • 400 Bad Request — Missing channel_id or channel is not WABA type
  • 401 Unauthorized — Invalid or missing API key
  • 500 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"
{
  "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"
    }
  }
}