Pular para o conteúdo

List the messages of a WhatsApp conversation

get /v1/whatsapp/{whatsapp_id}/messages

Messages in the order they were sent, oldest first, with sanitized text, media metadata (no media content) and the audio transcription when one exists. A message deleted for everyone stays in place as a tombstone with deleted_at set and every content field null; an edited message carries its current text and edited_at. Governed by the whatsapp_content rate-limit policy in addition to the client and company policies. The cursor is a keyset over (sent_at, id) bound to the conversation.

Exige os escopos whatsapp.read e whatsapp.content.read juntos.

NomeTipoObrigatórioDescrição
whatsapp_idstringSim—
NomeTipoObrigatórioDescrição
limitintegerNãoRecords per page, 1 to 100. A page may return fewer than this while has_more is still true; drive the loop by has_more, not by the size of data.
cursorstringNãoSigned cursor returned by the previous page.
Terminal window
curl "https://api.salesbud.com.br/v1/whatsapp/mtg_01JEXAMPLE/messages?limit=...&cursor=..." \
-H "Authorization: Bearer $SALESBUD_ACCESS_TOKEN"
200 OK
{
"data": [
{
"id": "wamsg_01JEXAMPLE1",
"object": "whatsapp_message",
"conversation_id": "wa_01JEXAMPLE",
"sent_at": "2026-09-12T15:30:00.000Z",
"direction": "inbound",
"author": {
"phone": "+5511999990001",
"name": "Cliente Exemplo"
},
"type": "text",
"text": "Pode me mandar a proposta?",
"media": null,
"transcription": null,
"edited_at": null,
"deleted_at": null,
"deleted_reason": null
},
{
"id": "wamsg_01JEXAMPLE2",
"object": "whatsapp_message",
"conversation_id": "wa_01JEXAMPLE",
"sent_at": "2026-09-12T15:32:00.000Z",
"direction": "outbound",
"author": {
"phone": "+5511988880001",
"name": "Vendedora Exemplo"
},
"type": "audio",
"text": null,
"media": {
"file_name": null,
"mime_type": "audio/ogg; codecs=opus",
"size_bytes": 48213
},
"transcription": "Claro, envio ainda hoje por e-mail.",
"edited_at": null,
"deleted_at": null,
"deleted_reason": null
},
{
"id": "wamsg_01JEXAMPLE3",
"object": "whatsapp_message",
"conversation_id": "wa_01JEXAMPLE",
"sent_at": "2026-09-12T15:35:00.000Z",
"direction": "inbound",
"author": {
"phone": "+5511999990001",
"name": "Cliente Exemplo"
},
"type": "text",
"text": null,
"media": null,
"transcription": null,
"edited_at": null,
"deleted_at": "2026-09-12T15:36:00.000Z",
"deleted_reason": "revoked_for_everyone"
}
],
"pagination": {
"limit": 50,
"has_more": false,
"next_cursor": null
},
"request_id": "req_ExampleRequestId01"
}
StatusDescrição
200Company-scoped WhatsApp message page.
400Invalid request.
401Missing or invalid credentials.
403The token lacks the required scope, its user owner lost matching product access, or a connector awaits administrator approval. API_ACCESS_DISABLED identifies the feature gate for manual clients and third-party OAuth apps; AI_COLLABORATORS_DISABLED identifies the gate for first-party OAuth apps. For partner credentials, the gate also requires an active partner and the required published module, and applies to previously issued tokens.
404Resource not found in the authenticated company, or outside what the owner of a user credential can see.
429Client rate limit exceeded.
503A required audit or rate-limit dependency is unavailable.