Criar conta grátis

Referência da API

Mensagens de WhatsApp

Envie mensagens de WhatsApp (texto, template, mídia ou flow) por um número da sua conta, liste o histórico com filtros e consulte o status de cada envio.

  • 3 operações
  • URL basehttps://api.messages.ccxcompany.co
  • AutenticaçãoBearer com a sua chave de API

O texto técnico abaixo vem do contrato público, o openapi.json, no idioma em que o contrato foi escrito.

List messages

GET/messages

Paginated list. Filters: status, numberId, contactId, campaignId, batchId, sentByAccountId, from, to, limit, skip. Default order is createdAt desc.

PII fields (recipient to) are masked unless the caller has pii:full.

Parâmetros

CampoOndeTipoDescrição
statusopcionalquerystringValores:queuedsendingsentdeliveredreadfailedarchived
numberIdopcionalquerystringBranded Number id (num_ prefix + 21 nano-id chars).
contactIdopcionalquerystringBranded Contact id (cnt_ prefix + 21 nano-id chars).
campaignIdopcionalquerystringFilter by external campaign tag. Used by the dashboard to scope a 'reprocess all failures of this campaign' action.
batchIdopcionalquerystringBranded batch id (btc_ prefix + 21 nano-id chars).
sentByAccountIdopcionalquerystringFilter by the operator who sent the message. Powers the dashboard's per-agent view, where every counter has to follow the selected attendant.
fromopcionalquerystring · date-timeISO-8601 timestamp in UTC.
toopcionalquerystring · date-timeISO-8601 timestamp in UTC.
limitopcionalqueryinteger
skipopcionalqueryinteger

Respostas

  • 200Default Response

    Campos e exemplo da resposta
    CampoTipoDescrição
    itemsobrigatórioobject[]
    items[].idobrigatóriostringBranded Message id (msg_ prefix + 21 nano-id chars).
    items[].organizationIdobrigatóriostringBranded Organization id (org_ prefix + 21 nano-id chars).
    items[].channelopcionalstringCanal da mensagem. Ausente em linhas antigas, anteriores ao campo — leia como whatsapp.Valores:whatsappemailsmsinstagram
    items[].numberIdopcionalstringBranded Number id (num_ prefix + 21 nano-id chars).
    items[].instagramAccountIdopcionalstringBranded Instagram account id (iga_ prefix + 21 nano-id chars).
    items[].mediaStorageopcionalobject
    items[].mediaStorage.mimeTypeopcionalstringMime REAL do binário, lido do Content-Type.
    items[].mediaStorage.sizeopcionalinteger
    items[].mediaStorage.storedAtopcionalstring · date-time
    items[].contactIdopcionalstringBranded Contact id (cnt_ prefix + 21 nano-id chars).
    items[].campaignIdopcionalstringOptional external campaign tag carried through from the create call. Surfaced as a filter on GET /messages and as a selector on POST /messages/bulk-resend.
    items[].metadataopcionalobjectMetadados de correlação do seu sistema (ex.: customerId, journeyId), devolvidos intactos em todo webhook desta mensagem. Até 20 chaves; chave começa por letra e usa [A-Za-z0-9_.-] (até 64); valor é texto (até 256), número ou booleano. Não envie dado pessoal aqui.
    items[].templateIdopcionalstringBranded Template id (tpl_ prefix + 21 nano-id chars).
    items[].batchIdopcionalstringBranded batch id (btc_ prefix + 21 nano-id chars).
    items[].toobrigatóriostringDestino, no formato do canal: telefone E.164 (whatsapp/sms), endereço de e-mail (email) ou IGSID (instagram). PII_SENSITIVE — mascarado a menos que o chamador tenha pii:full.
    items[].typeobrigatóriostringValores:texttemplatemediainteractive
    items[].directionobrigatóriostringValores:outboundinbound
    items[].priorityobrigatóriostringValores:normalbulkcritical
    items[].statusobrigatóriostringValores:queuedsendingsentdeliveredreadfailedarchived
    items[].forceobrigatóriobooleanWhen true the worker bypasses token bucket + quiet hours. Persisted for audit; only the force route sets it.
    items[].reprocessedopcionalbooleanTrue when a dashboard operator manually reprocessed this message. replacedBy points to the new message.
    items[].replacedByopcionalstringBranded Message id (msg_ prefix + 21 nano-id chars).
    items[].payloadobrigatórioanyOpaque per-type payload (text body, template ref, etc).
    items[].templateVarsopcionalstring[]
    items[].attemptsobrigatóriointeger
    items[].lastErroropcionalstringMost recent failure reason. After cancelAsReprocessed (or bulk-resend) this is overwritten with a 'substituted by ...' pointer string — see originalError for the underlying cause.
    items[].originalErroropcionalstringSnapshot of lastError taken the first time the message is reprocessed. Audit-trail field — never overwritten on subsequent transitions.
    items[].metaMessageIdopcionalstring
    items[].origemDoLinkopcionalobjectDe onde veio a mensagem que trouxe o código do link de WhatsApp (fonte, campanha, grupo, anúncio e palavra-chave do link) e o código que estava no texto. Só em mensagem recebida.
    items[].origemDoLink.fonteopcionalstringValores:googlemetatiktokoutra
    items[].origemDoLink.fonteRotuloopcionalstringO nome livre da fonte (src= do link) quando fonte é outra.
    items[].origemDoLink.campanhaopcionalstring
    items[].origemDoLink.grupoopcionalstring
    items[].origemDoLink.anuncioopcionalstring
    items[].origemDoLink.palavraChaveopcionalstring
    items[].origemDoLink.codigoopcionalstringO código que estava no texto, entre parênteses. O texto da mensagem não é alterado.
    items[].sentByAccountIdopcionalstring
    items[].sentByNameopcionalstringOperator display name (when sent from the dashboard).
    items[].scheduledAtopcionalstring · date-timeISO-8601 timestamp in UTC.
    items[].sentAtopcionalstring · date-timeISO-8601 timestamp in UTC.
    items[].deliveredAtopcionalstring · date-timeISO-8601 timestamp in UTC.
    items[].readAtopcionalstring · date-timeISO-8601 timestamp in UTC.
    items[].failedAtopcionalstring · date-timeISO-8601 timestamp in UTC.
    items[].createdAtobrigatóriostring · date-timeISO-8601 timestamp in UTC.
    items[].updatedAtobrigatóriostring · date-timeISO-8601 timestamp in UTC.
    totalobrigatóriointeger
    JSON
    {  "items": [    {      "id": "msg_aB3xY9zQ1pTkLmNoPqRsT",      "organizationId": "org_pGgniw5L7CTDSZDwjDrQ2",      "channel": "whatsapp",      "numberId": "num_aB3xY9zQ1pTkLmNoPqRsT",      "instagramAccountId": "iga_aB3xY9zQ1pTkLmNoPqRsT",      "mediaStorage": {        "mimeType": "string",        "size": 0,        "storedAt": "2026-10-16T12:00:00.000Z"      },      "contactId": "cnt_aB3xY9zQ1pTkLmNoPqRsT",      "campaignId": "string",      "metadata": {        "customerId": "123",        "journeyId": "reativacao-q4"      },      "templateId": "tpl_uV2aLwzXMqNmKjHbPiRoT",      "batchId": "btc_aB3xY9zQ1pTkLmNoPqRsT",      "to": "+5511999998888",      "type": "text",      "direction": "outbound",      "priority": "normal",      "status": "queued",      "force": true,      "reprocessed": true,      "replacedBy": "msg_aB3xY9zQ1pTkLmNoPqRsT",      "payload": null,      "templateVars": [        "string"      ],      "attempts": 0,      "lastError": "string",      "originalError": "string",      "metaMessageId": "wamid.HBgN...",      "origemDoLink": {        "fonte": "tiktok",        "fonteRotulo": "bio",        "campanha": "Verão",        "grupo": "Corredores SP",        "anuncio": "Corrida no parque",        "palavraChave": "tênis de corrida",        "codigo": "K7Q2X"      },      "sentByAccountId": "string",      "sentByName": "string",      "scheduledAt": "2026-04-07T17:30:00.000Z",      "sentAt": "2026-04-07T17:30:00.000Z",      "deliveredAt": "2026-04-07T17:30:00.000Z",      "readAt": "2026-04-07T17:30:00.000Z",      "failedAt": "2026-04-07T17:30:00.000Z",      "createdAt": "2026-04-07T17:30:00.000Z",      "updatedAt": "2026-04-07T17:30:00.000Z"    }  ],  "total": 42}
  • 401RFC 7807 problem details for UNAUTHORIZED (401).

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

As respostas de erro seguem o formato RFC 7807 (application/problem+json), com um código estável no campo code. Ver os códigos de erro

Exemplo em curl

cURL
curl 'https://api.messages.ccxcompany.co/messages' \  -H "Authorization: Bearer $CCX_API_KEY"
Só os campos obrigatórios. Troque os valores de exemplo pelos seus.

Send a single outbound message

POST/messages

Persists the message + an outbox row in a single Mongo transaction, then attempts an inline Rabbit publish to messages.outbound with routing key matching the priority. Inline publish failures leave the outbox row pending — the worker poller (Step 19) drains stragglers.

Idempotency: optional. Send Idempotency-Key header (or idempotencyKey in the body — when both are present they MUST match) to make the call replayable for 24h. Same key + same fingerprint → original response is returned. Same key + different body → 409 IDEMPOTENCY_CONFLICT.

Priority routing:

  • critical → out.priority queue
  • normal → out.normal queue (default)
  • bulk → out.bulk queue

Corpo por `type` (o `payload` muda conforme o tipo):

  • text → { "type": "text", "payload": { "text": { "body": "Olá!" } } }
  • template → { "type": "template", "payload": { "template": { "name": "boas_vindas", "languageCode": "pt_BR", "components": [] } } } (ou envie templateId + templateVars e a plataforma materializa o template)
  • media (imagem) → { "type": "media", "payload": { "kind": "image", "media": { "link": "https://…/foto.jpg", "caption": "…" } } }
  • media (áudio) → { "type": "media", "payload": { "kind": "audio", "media": { "link": "https://…/audio.ogg" } } }
  • media (vídeo) → { "type": "media", "payload": { "kind": "video", "media": { "link": "https://…/video.mp4", "caption": "…" } } }
  • media (documento) → { "type": "media", "payload": { "kind": "document", "media": { "link": "https://…/fatura.pdf", "filename": "fatura.pdf" } } }
  • media (sticker) → { "type": "media", "payload": { "kind": "sticker", "media": { "link": "https://…/sticker.webp" } } }
  • interactive (flow) → { "type": "interactive", "payload": { "flow": { "metaFlowId": "123…", "flowCta": "Começar", "flowAction": "navigate", "headerText": "…", "bodyText": "…", "mode": "published" } } }

Em media, use media.link (URL pública) OU media.id (mídia já enviada à Meta). caption/filename são opcionais. replyTo (id de mensagem) é aceito em qualquer tipo.

Opt-out: template de MARKETING (templateId com categoria marketing) para contato que pediu para não receber comunicação é recusado com 422 e meta.motivo: "opt_out". Utilidade, autenticação e texto livre na janela de atendimento seguem saindo.

Always returns 201 once the transaction commits — the message IS in the system regardless of the inline publish outcome.

Corpo da requisiçãoapplication/json

CampoTipoDescrição
numberIdobrigatóriostringBranded Number id (num_ prefix + 21 nano-id chars).
toobrigatóriostringE.164 phone (recipient).
typeobrigatóriostringValores:texttemplatemediainteractive
priorityopcionalstringRouting priority. Maps to out.{critical|normal|bulk} queues.Valores:normalbulkcriticalPadrão:normal
payloadobrigatórioobjectCorpo por tipo (validado ponta-a-ponta pelo worker contra @ccx/meta): text → { text: { body } }; template → informe templateId (+ templateVars) OU { template: { name, languageCode } }; media → { kind: image|audio|video|document|sticker, media: { link } }; interactive → { flow: { metaFlowId, flowCta } }.
templateIdopcionalstringBranded Template id (tpl_ prefix + 21 nano-id chars).
templateVarsopcionalstring[]
contactIdopcionalstringBranded Contact id (cnt_ prefix + 21 nano-id chars).
campaignIdopcionalstringOptional campaign tag carried through to the persisted message. Used by GET /messages?campaignId=... and POST /messages/bulk-resend filters to scope retries to a single campaign.
metadataopcionalobjectMetadados de correlação do seu sistema (ex.: customerId, journeyId), devolvidos intactos em todo webhook desta mensagem. Até 20 chaves; chave começa por letra e usa [A-Za-z0-9_.-] (até 64); valor é texto (até 256), número ou booleano. Não envie dado pessoal aqui.
scheduledAtopcionalstring · date-timeISO-8601 timestamp in UTC.
idempotencyKeyopcionalstringOptional Stripe-style idempotency key. Also accepted via Idempotency-Key header — when both are present they MUST match (400 otherwise).
Exemplo completo do corpo
JSON
{  "numberId": "num_aB3xY9zQ1pTkLmNoPqRsT",  "to": "+5511999998888",  "type": "text",  "priority": "normal",  "payload": {    "text": {      "body": "Olá! Mensagem de teste do CCX."    }  },  "templateId": "tpl_uV2aLwzXMqNmKjHbPiRoT",  "templateVars": [    "Alice",    "ORDER123"  ],  "contactId": "cnt_aB3xY9zQ1pTkLmNoPqRsT",  "campaignId": "string",  "metadata": {    "customerId": "123",    "journeyId": "reativacao-q4"  },  "scheduledAt": "2026-04-07T17:30:00.000Z",  "idempotencyKey": "checkout-12345"}

Respostas

  • 201Default Response

    Campos e exemplo da resposta
    CampoTipoDescrição
    idobrigatóriostringBranded Message id (msg_ prefix + 21 nano-id chars).
    organizationIdobrigatóriostringBranded Organization id (org_ prefix + 21 nano-id chars).
    channelopcionalstringCanal da mensagem. Ausente em linhas antigas, anteriores ao campo — leia como whatsapp.Valores:whatsappemailsmsinstagram
    numberIdopcionalstringBranded Number id (num_ prefix + 21 nano-id chars).
    instagramAccountIdopcionalstringBranded Instagram account id (iga_ prefix + 21 nano-id chars).
    mediaStorageopcionalobject
    mediaStorage.mimeTypeopcionalstringMime REAL do binário, lido do Content-Type.
    mediaStorage.sizeopcionalinteger
    mediaStorage.storedAtopcionalstring · date-time
    contactIdopcionalstringBranded Contact id (cnt_ prefix + 21 nano-id chars).
    campaignIdopcionalstringOptional external campaign tag carried through from the create call. Surfaced as a filter on GET /messages and as a selector on POST /messages/bulk-resend.
    metadataopcionalobjectMetadados de correlação do seu sistema (ex.: customerId, journeyId), devolvidos intactos em todo webhook desta mensagem. Até 20 chaves; chave começa por letra e usa [A-Za-z0-9_.-] (até 64); valor é texto (até 256), número ou booleano. Não envie dado pessoal aqui.
    templateIdopcionalstringBranded Template id (tpl_ prefix + 21 nano-id chars).
    batchIdopcionalstringBranded batch id (btc_ prefix + 21 nano-id chars).
    toobrigatóriostringDestino, no formato do canal: telefone E.164 (whatsapp/sms), endereço de e-mail (email) ou IGSID (instagram). PII_SENSITIVE — mascarado a menos que o chamador tenha pii:full.
    typeobrigatóriostringValores:texttemplatemediainteractive
    directionobrigatóriostringValores:outboundinbound
    priorityobrigatóriostringValores:normalbulkcritical
    statusobrigatóriostringValores:queuedsendingsentdeliveredreadfailedarchived
    forceobrigatóriobooleanWhen true the worker bypasses token bucket + quiet hours. Persisted for audit; only the force route sets it.
    reprocessedopcionalbooleanTrue when a dashboard operator manually reprocessed this message. replacedBy points to the new message.
    replacedByopcionalstringBranded Message id (msg_ prefix + 21 nano-id chars).
    payloadobrigatórioanyOpaque per-type payload (text body, template ref, etc).
    templateVarsopcionalstring[]
    attemptsobrigatóriointeger
    lastErroropcionalstringMost recent failure reason. After cancelAsReprocessed (or bulk-resend) this is overwritten with a 'substituted by ...' pointer string — see originalError for the underlying cause.
    originalErroropcionalstringSnapshot of lastError taken the first time the message is reprocessed. Audit-trail field — never overwritten on subsequent transitions.
    metaMessageIdopcionalstring
    origemDoLinkopcionalobjectDe onde veio a mensagem que trouxe o código do link de WhatsApp (fonte, campanha, grupo, anúncio e palavra-chave do link) e o código que estava no texto. Só em mensagem recebida.
    origemDoLink.fonteopcionalstringValores:googlemetatiktokoutra
    origemDoLink.fonteRotuloopcionalstringO nome livre da fonte (src= do link) quando fonte é outra.
    origemDoLink.campanhaopcionalstring
    origemDoLink.grupoopcionalstring
    origemDoLink.anuncioopcionalstring
    origemDoLink.palavraChaveopcionalstring
    origemDoLink.codigoopcionalstringO código que estava no texto, entre parênteses. O texto da mensagem não é alterado.
    sentByAccountIdopcionalstring
    sentByNameopcionalstringOperator display name (when sent from the dashboard).
    scheduledAtopcionalstring · date-timeISO-8601 timestamp in UTC.
    sentAtopcionalstring · date-timeISO-8601 timestamp in UTC.
    deliveredAtopcionalstring · date-timeISO-8601 timestamp in UTC.
    readAtopcionalstring · date-timeISO-8601 timestamp in UTC.
    failedAtopcionalstring · date-timeISO-8601 timestamp in UTC.
    createdAtobrigatóriostring · date-timeISO-8601 timestamp in UTC.
    updatedAtobrigatóriostring · date-timeISO-8601 timestamp in UTC.
    JSON
    {  "id": "msg_aB3xY9zQ1pTkLmNoPqRsT",  "organizationId": "org_pGgniw5L7CTDSZDwjDrQ2",  "channel": "whatsapp",  "numberId": "num_aB3xY9zQ1pTkLmNoPqRsT",  "instagramAccountId": "iga_aB3xY9zQ1pTkLmNoPqRsT",  "mediaStorage": {    "mimeType": "string",    "size": 0,    "storedAt": "2026-10-16T12:00:00.000Z"  },  "contactId": "cnt_aB3xY9zQ1pTkLmNoPqRsT",  "campaignId": "string",  "metadata": {    "customerId": "123",    "journeyId": "reativacao-q4"  },  "templateId": "tpl_uV2aLwzXMqNmKjHbPiRoT",  "batchId": "btc_aB3xY9zQ1pTkLmNoPqRsT",  "to": "+5511999998888",  "type": "text",  "direction": "outbound",  "priority": "normal",  "status": "queued",  "force": true,  "reprocessed": true,  "replacedBy": "msg_aB3xY9zQ1pTkLmNoPqRsT",  "payload": null,  "templateVars": [    "string"  ],  "attempts": 0,  "lastError": "string",  "originalError": "string",  "metaMessageId": "wamid.HBgN...",  "origemDoLink": {    "fonte": "tiktok",    "fonteRotulo": "bio",    "campanha": "Verão",    "grupo": "Corredores SP",    "anuncio": "Corrida no parque",    "palavraChave": "tênis de corrida",    "codigo": "K7Q2X"  },  "sentByAccountId": "string",  "sentByName": "string",  "scheduledAt": "2026-04-07T17:30:00.000Z",  "sentAt": "2026-04-07T17:30:00.000Z",  "deliveredAt": "2026-04-07T17:30:00.000Z",  "readAt": "2026-04-07T17:30:00.000Z",  "failedAt": "2026-04-07T17:30:00.000Z",  "createdAt": "2026-04-07T17:30:00.000Z",  "updatedAt": "2026-04-07T17:30: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).

As respostas de erro seguem o formato RFC 7807 (application/problem+json), com um código estável no campo code. Ver os códigos de erro

Exemplo em curl

cURL
curl -X POST 'https://api.messages.ccxcompany.co/messages' \  -H "Authorization: Bearer $CCX_API_KEY" \  -H "Idempotency-Key: order-4821" \  -H "Content-Type: application/json" \  -d '{    "numberId": "num_aB3xY9zQ1pTkLmNoPqRsT",    "to": "+5511999998888",    "type": "text",    "payload": {      "text": {        "body": "Olá! Mensagem de teste do CCX."      }    }  }'
Só os campos obrigatórios. Troque os valores de exemplo pelos seus.

Get a single message

GET/messages/{id}

Returns the persisted Message including current status. Cross-tenant requests get 404 (Mongo Guardian filter masks existence).

Parâmetros

CampoOndeTipoDescrição
idobrigatóriocaminhostringBranded Message id (msg_ prefix + 21 nano-id chars).

Respostas

  • 200Default Response

    Campos e exemplo da resposta
    CampoTipoDescrição
    idobrigatóriostringBranded Message id (msg_ prefix + 21 nano-id chars).
    organizationIdobrigatóriostringBranded Organization id (org_ prefix + 21 nano-id chars).
    channelopcionalstringCanal da mensagem. Ausente em linhas antigas, anteriores ao campo — leia como whatsapp.Valores:whatsappemailsmsinstagram
    numberIdopcionalstringBranded Number id (num_ prefix + 21 nano-id chars).
    instagramAccountIdopcionalstringBranded Instagram account id (iga_ prefix + 21 nano-id chars).
    mediaStorageopcionalobject
    mediaStorage.mimeTypeopcionalstringMime REAL do binário, lido do Content-Type.
    mediaStorage.sizeopcionalinteger
    mediaStorage.storedAtopcionalstring · date-time
    contactIdopcionalstringBranded Contact id (cnt_ prefix + 21 nano-id chars).
    campaignIdopcionalstringOptional external campaign tag carried through from the create call. Surfaced as a filter on GET /messages and as a selector on POST /messages/bulk-resend.
    metadataopcionalobjectMetadados de correlação do seu sistema (ex.: customerId, journeyId), devolvidos intactos em todo webhook desta mensagem. Até 20 chaves; chave começa por letra e usa [A-Za-z0-9_.-] (até 64); valor é texto (até 256), número ou booleano. Não envie dado pessoal aqui.
    templateIdopcionalstringBranded Template id (tpl_ prefix + 21 nano-id chars).
    batchIdopcionalstringBranded batch id (btc_ prefix + 21 nano-id chars).
    toobrigatóriostringDestino, no formato do canal: telefone E.164 (whatsapp/sms), endereço de e-mail (email) ou IGSID (instagram). PII_SENSITIVE — mascarado a menos que o chamador tenha pii:full.
    typeobrigatóriostringValores:texttemplatemediainteractive
    directionobrigatóriostringValores:outboundinbound
    priorityobrigatóriostringValores:normalbulkcritical
    statusobrigatóriostringValores:queuedsendingsentdeliveredreadfailedarchived
    forceobrigatóriobooleanWhen true the worker bypasses token bucket + quiet hours. Persisted for audit; only the force route sets it.
    reprocessedopcionalbooleanTrue when a dashboard operator manually reprocessed this message. replacedBy points to the new message.
    replacedByopcionalstringBranded Message id (msg_ prefix + 21 nano-id chars).
    payloadobrigatórioanyOpaque per-type payload (text body, template ref, etc).
    templateVarsopcionalstring[]
    attemptsobrigatóriointeger
    lastErroropcionalstringMost recent failure reason. After cancelAsReprocessed (or bulk-resend) this is overwritten with a 'substituted by ...' pointer string — see originalError for the underlying cause.
    originalErroropcionalstringSnapshot of lastError taken the first time the message is reprocessed. Audit-trail field — never overwritten on subsequent transitions.
    metaMessageIdopcionalstring
    origemDoLinkopcionalobjectDe onde veio a mensagem que trouxe o código do link de WhatsApp (fonte, campanha, grupo, anúncio e palavra-chave do link) e o código que estava no texto. Só em mensagem recebida.
    origemDoLink.fonteopcionalstringValores:googlemetatiktokoutra
    origemDoLink.fonteRotuloopcionalstringO nome livre da fonte (src= do link) quando fonte é outra.
    origemDoLink.campanhaopcionalstring
    origemDoLink.grupoopcionalstring
    origemDoLink.anuncioopcionalstring
    origemDoLink.palavraChaveopcionalstring
    origemDoLink.codigoopcionalstringO código que estava no texto, entre parênteses. O texto da mensagem não é alterado.
    sentByAccountIdopcionalstring
    sentByNameopcionalstringOperator display name (when sent from the dashboard).
    scheduledAtopcionalstring · date-timeISO-8601 timestamp in UTC.
    sentAtopcionalstring · date-timeISO-8601 timestamp in UTC.
    deliveredAtopcionalstring · date-timeISO-8601 timestamp in UTC.
    readAtopcionalstring · date-timeISO-8601 timestamp in UTC.
    failedAtopcionalstring · date-timeISO-8601 timestamp in UTC.
    createdAtobrigatóriostring · date-timeISO-8601 timestamp in UTC.
    updatedAtobrigatóriostring · date-timeISO-8601 timestamp in UTC.
    JSON
    {  "id": "msg_aB3xY9zQ1pTkLmNoPqRsT",  "organizationId": "org_pGgniw5L7CTDSZDwjDrQ2",  "channel": "whatsapp",  "numberId": "num_aB3xY9zQ1pTkLmNoPqRsT",  "instagramAccountId": "iga_aB3xY9zQ1pTkLmNoPqRsT",  "mediaStorage": {    "mimeType": "string",    "size": 0,    "storedAt": "2026-10-16T12:00:00.000Z"  },  "contactId": "cnt_aB3xY9zQ1pTkLmNoPqRsT",  "campaignId": "string",  "metadata": {    "customerId": "123",    "journeyId": "reativacao-q4"  },  "templateId": "tpl_uV2aLwzXMqNmKjHbPiRoT",  "batchId": "btc_aB3xY9zQ1pTkLmNoPqRsT",  "to": "+5511999998888",  "type": "text",  "direction": "outbound",  "priority": "normal",  "status": "queued",  "force": true,  "reprocessed": true,  "replacedBy": "msg_aB3xY9zQ1pTkLmNoPqRsT",  "payload": null,  "templateVars": [    "string"  ],  "attempts": 0,  "lastError": "string",  "originalError": "string",  "metaMessageId": "wamid.HBgN...",  "origemDoLink": {    "fonte": "tiktok",    "fonteRotulo": "bio",    "campanha": "Verão",    "grupo": "Corredores SP",    "anuncio": "Corrida no parque",    "palavraChave": "tênis de corrida",    "codigo": "K7Q2X"  },  "sentByAccountId": "string",  "sentByName": "string",  "scheduledAt": "2026-04-07T17:30:00.000Z",  "sentAt": "2026-04-07T17:30:00.000Z",  "deliveredAt": "2026-04-07T17:30:00.000Z",  "readAt": "2026-04-07T17:30:00.000Z",  "failedAt": "2026-04-07T17:30:00.000Z",  "createdAt": "2026-04-07T17:30:00.000Z",  "updatedAt": "2026-04-07T17:30:00.000Z"}
  • 401RFC 7807 problem details for UNAUTHORIZED (401).

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

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

As respostas de erro seguem o formato RFC 7807 (application/problem+json), com um código estável no campo code. Ver os códigos de erro

Exemplo em curl

cURL
curl 'https://api.messages.ccxcompany.co/messages/msg_aB3xY9zQ1pTkLmNoPqRsT' \  -H "Authorization: Bearer $CCX_API_KEY"
Só os campos obrigatórios. Troque os valores de exemplo pelos seus.

Travou em alguma rota? Fale com quem mantém a API.

Criando a conta pelo site, você ganha R$ 10 de crédito de teste.