Start free

API reference

WhatsApp templates

List your organization's WhatsApp templates with each one's id, language and variables, read a single template by id and create new ones as drafts.

  • 3 operations
  • Base URLhttps://api.messages.ccxcompany.co
  • AuthenticationBearer with your API key

The technical text below comes from the public contract, openapi.json, in the language the contract was written in.

Lista os templates da organização

GET/v2/templates

Devolve os templates da organização da credencial. Filtros: status, category, language, numberId, limit, skip. Ordenado por createdAt desc.

Use isto para descobrir o id, o language e as variáveis (em components) antes de enviar uma mensagem de template.

A organização vem da credencial — não existe parâmetro para escolhê-la, e o isolamento entre tenants é imposto pelo Mongo Guardian.

Parameters

FieldInTypeDescription
statusoptionalquerystringValues:draftsubmittedpendingapprovedrejectedpauseddisabled
categoryoptionalquerystringValues:marketingutilityauthentication
languageoptionalquerystringValues:pt-BRen-USes-ES
numberIdoptionalquerystring
limitoptionalqueryinteger
skipoptionalqueryinteger

Responses

  • 200Default Response

    Response fields and example
    FieldTypeDescription
    itemsrequiredobject[]
    items[].idrequiredstring
    items[].organizationIdrequiredstring
    items[].numberIdrequiredstring
    items[].namerequiredstring
    items[].languagerequiredstringValues:pt-BRen-USes-ES
    items[].categoryrequiredstringValues:marketingutilityauthentication
    items[].statusrequiredstringValues:draftsubmittedpendingapprovedrejectedpauseddisabled
    items[].componentsrequiredobject[]
    items[].components[].typerequiredstring
    items[].components[].payloadoptionalany
    items[].headerExampleUrloptionalstring · uri
    items[].metaTemplateIdoptionalstring
    items[].versionrequiredinteger
    items[].rejectionReasonoptionalstring
    items[].createdAtrequiredstring · date-time
    items[].updatedAtrequiredstring · date-time
    totalrequiredinteger
    JSON
    {  "items": [    {      "id": "string",      "organizationId": "string",      "numberId": "string",      "name": "string",      "language": "pt-BR",      "category": "marketing",      "status": "draft",      "components": [        {          "type": "string",          "payload": null        }      ],      "headerExampleUrl": "https://example.com",      "metaTemplateId": "string",      "version": 1,      "rejectionReason": "string",      "createdAt": "2026-10-16T12:00:00.000Z",      "updatedAt": "2026-10-16T12:00:00.000Z"    }  ],  "total": 0}
  • 400RFC 7807 problem details for BAD_REQUEST (400).

  • 401RFC 7807 problem details for UNAUTHORIZED (401).

  • 403RFC 7807 problem details for FORBIDDEN (403).

Error responses follow RFC 7807 (application/problem+json), with a stable code in the code field. See the error codes

curl example

cURL
curl 'https://api.messages.ccxcompany.co/v2/templates' \  -H "Authorization: Bearer $CCX_API_KEY"
Required fields only. Swap the sample values for your own.

Cria um template em rascunho

POST/v2/templates

Cria um Template em status: "draft" na organização da credencial. O numberId precisa referenciar um Number da própria organização (senão 400).

Unicidade: name + language são únicos por número WABA (a mesma regra da Meta). Duplicado devolve 409.

Criar é inofensivo — nada é enviado à Meta aqui. A submissão para revisão (POST /templates/:id/submit, que consome a cota de revisão) continua fora do contrato público.

Só a forma dos components ({ type, payload }[]) é validada neste passo; as regras da Meta (contagem de variáveis, limites de botão, esquema de URL) valem na submissão.

Request bodyapplication/json

FieldTypeDescription
numberIdrequiredstring
namerequiredstring
languagerequiredstringValues:pt-BRen-USes-ES
categoryrequiredstringValues:marketingutilityauthentication
componentsrequiredobject[]
components[].typerequiredstring
components[].payloadoptionalany
headerExampleUrloptionalstring · uri
Full body example
JSON
{  "numberId": "string",  "name": "string",  "language": "pt-BR",  "category": "marketing",  "components": [    {      "type": "string",      "payload": null    }  ],  "headerExampleUrl": "https://example.com"}

Responses

  • 201Default Response

    Response fields and example
    FieldTypeDescription
    idrequiredstring
    organizationIdrequiredstring
    numberIdrequiredstring
    namerequiredstring
    languagerequiredstringValues:pt-BRen-USes-ES
    categoryrequiredstringValues:marketingutilityauthentication
    statusrequiredstringValues:draftsubmittedpendingapprovedrejectedpauseddisabled
    componentsrequiredobject[]
    components[].typerequiredstring
    components[].payloadoptionalany
    headerExampleUrloptionalstring · uri
    metaTemplateIdoptionalstring
    versionrequiredinteger
    rejectionReasonoptionalstring
    createdAtrequiredstring · date-time
    updatedAtrequiredstring · date-time
    JSON
    {  "id": "string",  "organizationId": "string",  "numberId": "string",  "name": "string",  "language": "pt-BR",  "category": "marketing",  "status": "draft",  "components": [    {      "type": "string",      "payload": null    }  ],  "headerExampleUrl": "https://example.com",  "metaTemplateId": "string",  "version": 1,  "rejectionReason": "string",  "createdAt": "2026-10-16T12:00:00.000Z",  "updatedAt": "2026-10-16T12:00:00.000Z"}
  • 400RFC 7807 problem details for BAD_REQUEST (400).

  • 401RFC 7807 problem details for UNAUTHORIZED (401).

  • 403RFC 7807 problem details for FORBIDDEN (403).

  • 409RFC 7807 problem details for CONFLICT (409).

  • 422RFC 7807 problem details for VALIDATION_ERROR (422).

Error responses follow RFC 7807 (application/problem+json), with a stable code in the code field. See the error codes

curl example

cURL
curl -X POST 'https://api.messages.ccxcompany.co/v2/templates' \  -H "Authorization: Bearer $CCX_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "numberId": "string",    "name": "string",    "language": "pt-BR",    "category": "marketing",    "components": [      {        "type": "string"      }    ]  }'
Required fields only. Swap the sample values for your own.

Lê um template pelo id

GET/v2/templates/{id}

Devolve um template da organização da credencial.

404 também é a resposta para um template de outra organização — o isolamento é imposto pelo Mongo Guardian, e distinguir “não existe” de “não é seu” contaria a existência de dado alheio.

Parameters

FieldInTypeDescription
idrequiredpathstring

Responses

  • 200Default Response

    Response fields and example
    FieldTypeDescription
    idrequiredstring
    organizationIdrequiredstring
    numberIdrequiredstring
    namerequiredstring
    languagerequiredstringValues:pt-BRen-USes-ES
    categoryrequiredstringValues:marketingutilityauthentication
    statusrequiredstringValues:draftsubmittedpendingapprovedrejectedpauseddisabled
    componentsrequiredobject[]
    components[].typerequiredstring
    components[].payloadoptionalany
    headerExampleUrloptionalstring · uri
    metaTemplateIdoptionalstring
    versionrequiredinteger
    rejectionReasonoptionalstring
    createdAtrequiredstring · date-time
    updatedAtrequiredstring · date-time
    JSON
    {  "id": "string",  "organizationId": "string",  "numberId": "string",  "name": "string",  "language": "pt-BR",  "category": "marketing",  "status": "draft",  "components": [    {      "type": "string",      "payload": null    }  ],  "headerExampleUrl": "https://example.com",  "metaTemplateId": "string",  "version": 1,  "rejectionReason": "string",  "createdAt": "2026-10-16T12:00:00.000Z",  "updatedAt": "2026-10-16T12:00:00.000Z"}
  • 400RFC 7807 problem details for BAD_REQUEST (400).

  • 401RFC 7807 problem details for UNAUTHORIZED (401).

  • 403RFC 7807 problem details for FORBIDDEN (403).

  • 404RFC 7807 problem details for NOT_FOUND (404).

Error responses follow RFC 7807 (application/problem+json), with a stable code in the code field. See the error codes

curl example

cURL
curl 'https://api.messages.ccxcompany.co/v2/templates/<id>' \  -H "Authorization: Bearer $CCX_API_KEY"
Required fields only. Swap the sample values for your own.

Stuck on a route? Talk to the people who run the API.

Sign up through the site and get a US$5 test credit.