List templates

The business's WhatsApp templates, with the template_id that POST /send-template takes. A template belongs to a WhatsApp Business account and can be sent from any number of that account.

GET/templates

Authentication

This endpoint authenticates with your API key sent in the X-API-Key header (ek_live_... format). You can create it in Business settings → API Keys.

Query parameters

ParameterTypeRequiredDescription
phone_numberStringOptionalBusiness number with country code, e.g. 56912345678. Returns only the templates of that number's account. If the number is not one of the business's, the response is 404.

Example request

bash
curl -X GET "https://api.eclecticlabs.com/api/external/v2/templates?phone_number=56912345678" \
  -H "X-API-Key: ek_live_your_api_key_here"

Example response

json
{
  "templates": [
    {
      "template_id": "8f1d2c3b-6a4e-4f10-9b7a-2c1e5d7f9a10",
      "meta_id": "1234567890123456",
      "name": "order_ready",
      "language": "es",
      "status": "APPROVED",
      "category": "UTILITY",
      "variables": ["1", "2"],
      "phone_numbers": ["56912345678"],
      "hidden": false
    }
  ]
}

variables are the body keys POST /send-template expects ("1", "2", ... for positional templates). meta_id is Meta's id of the template. Only APPROVED templates can be sent. A template with hidden set to true was hidden in the dashboard; it still sends.