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
| Campo | Onde | Tipo | Descrição |
|---|---|---|---|
statusopcional | query | string | Valores:queuedsendingsentdeliveredreadfailedarchived |
numberIdopcional | query | string | Branded Number id (num_ prefix + 21 nano-id chars). |
contactIdopcional | query | string | Branded Contact id (cnt_ prefix + 21 nano-id chars). |
campaignIdopcional | query | string | Filter by external campaign tag. Used by the dashboard to scope a 'reprocess all failures of this campaign' action. |
batchIdopcional | query | string | Branded batch id (btc_ prefix + 21 nano-id chars). |
sentByAccountIdopcional | query | string | Filter by the operator who sent the message. Powers the dashboard's per-agent view, where every counter has to follow the selected attendant. |
fromopcional | query | string · date-time | ISO-8601 timestamp in UTC. |
toopcional | query | string · date-time | ISO-8601 timestamp in UTC. |
limitopcional | query | integer | |
skipopcional | query | integer |
Respostas
200Default ResponseCampos e exemplo da resposta
Campo Tipo Descriçã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:whatsappemailsmsinstagramitems[].numberIdopcionalstringBranded Number id ( num_prefix + 21 nano-id chars).items[].instagramAccountIdopcionalstringBranded Instagram account id ( iga_prefix + 21 nano-id chars).items[].mediaStorageopcionalobjectitems[].mediaStorage.mimeTypeopcionalstringMime REAL do binário, lido do Content-Type. items[].mediaStorage.sizeopcionalintegeritems[].mediaStorage.storedAtopcionalstring · date-timeitems[].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 /messagesand as a selector onPOST /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: texttemplatemediainteractiveitems[].directionobrigatóriostringValores: outboundinbounditems[].priorityobrigatóriostringValores: normalbulkcriticalitems[].statusobrigatóriostringValores: queuedsendingsentdeliveredreadfailedarchiveditems[].forceobrigatóriobooleanWhen true the worker bypasses token bucket + quiet hours. Persisted for audit; only the forceroute sets it.items[].reprocessedopcionalbooleanTrue when a dashboard operator manually reprocessed this message. replacedBypoints 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óriointegeritems[].lastErroropcionalstringMost recent failure reason. After cancelAsReprocessed(or bulk-resend) this is overwritten with a 'substituted by ...' pointer string — seeoriginalErrorfor the underlying cause.items[].originalErroropcionalstringSnapshot of lastErrortaken the first time the message is reprocessed. Audit-trail field — never overwritten on subsequent transitions.items[].metaMessageIdopcionalstringitems[].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: googlemetatiktokoutraitems[].origemDoLink.fonteRotuloopcionalstringO nome livre da fonte ( src=do link) quandofonteéoutra.items[].origemDoLink.campanhaopcionalstringitems[].origemDoLink.grupoopcionalstringitems[].origemDoLink.anuncioopcionalstringitems[].origemDoLink.palavraChaveopcionalstringitems[].origemDoLink.codigoopcionalstringO código que estava no texto, entre parênteses. O texto da mensagem não é alterado. items[].sentByAccountIdopcionalstringitems[].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óriointegerJSON{ "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 'https://api.messages.ccxcompany.co/messages' \ -H "Authorization: Bearer $CCX_API_KEY"