v1
Mensagens

Listar as mensagens de uma conversa

GET/api/v1/messages/conversations/{conversationId}

Devolve as mensagens de uma conversa, paginadas, com o texto, a mídia e o estado de entrega de cada uma.

A chave de API precisa do escopoLer mensagensmessages.read

Parâmetros

NomeOndeDescrição
conversationIdobrigatóriostring (uuid)pathId da conversa.
pageintegerqueryPágina, a partir de 1.Padrão: 1
pageSizeintegerqueryQuantas mensagens por página.Padrão: 50

Respostas

200As mensagens da página.
application/json
[
  {
    "id": "1d7a3f9c-2b6e-4c8d-a5f1-7e0b4d2c9a63",
    "businessId": "2ea7ad0d-8e13-4008-9fd8-7c92fe8677f2",
    "conversationId": "3c8e1a5d-7b2f-4d6a-9e0c-5a1f8b3d7e29",
    "phoneNumberId": "5f0c2a1e-7d4b-4c8a-9e21-3b6d8f0a4c57",
    "contactId": "af147888-ebb0-4ec9-92e5-da66cd561461",
    "wabaMessageId": "wamid.HBgNNTUxMTk4ODg4Nzc3NxUCABIYFjNFQjBDNzY1QTkxRjRBMkQ4RTAA",
    "provider": "MetaWaba",
    "direction": "Inbound",
    "type": "Text",
    "status": "Read",
    "mediaUrl": null,
    "text": "Boa tarde! Meu pedido já saiu?",
    "caption": null,
    "fileName": null,
    "replyToWabaMessageId": null,
    "createdAt": "2026-11-25T17:38:51.204417Z",
    "sentAt": "2026-11-25T17:38:50Z",
    "deliveredAt": null,
    "readAt": null,
    "errorCode": null,
    "errorMessage": null,
    "contact": {
      "id": "af147888-ebb0-4ec9-92e5-da66cd561461",
      "name": "Fulano de Tal",
      "phoneNumber": "5511988887777",
      "profileImageUrl": null
    },
    "reactions": []
  },
  {
    "id": "9e4b7c2a-6d1f-4a3e-8b5c-0f7d2a9e6c41",
    "businessId": "2ea7ad0d-8e13-4008-9fd8-7c92fe8677f2",
    "conversationId": "3c8e1a5d-7b2f-4d6a-9e0c-5a1f8b3d7e29",
    "phoneNumberId": "5f0c2a1e-7d4b-4c8a-9e21-3b6d8f0a4c57",
    "contactId": "af147888-ebb0-4ec9-92e5-da66cd561461",
    "wabaMessageId": "wamid.HBgNNTUxMTk4ODg4Nzc3NxUCABEYEjZDMUQ0RjNBOEIyRTdDOTUwAA==",
    "provider": "MetaWaba",
    "direction": "Outbound",
    "type": "Text",
    "status": "Delivered",
    "mediaUrl": null,
    "text": "Oi, Fulano! Seu pedido saiu para entrega e chega hoje até as 18h.",
    "caption": null,
    "fileName": null,
    "replyToWabaMessageId": null,
    "createdAt": "2026-11-25T17:40:03.511902Z",
    "sentAt": "2026-11-25T17:40:04Z",
    "deliveredAt": "2026-11-25T17:40:06Z",
    "readAt": null,
    "errorCode": null,
    "errorMessage": null,
    "contact": {
      "id": "af147888-ebb0-4ec9-92e5-da66cd561461",
      "name": "Fulano de Tal",
      "phoneNumber": "5511988887777",
      "profileImageUrl": null
    },
    "reactions": []
  }
]
400Requisição inválida: corpo que não é JSON, campo obrigatório ausente ou valor fora do formato.
application/json
{
  "error": "validation_failed",
  "message": "O campo name é obrigatório."
}
401Credenciais ausentes ou inválidas. A resposta é a mesma para chave inexistente e secret errada; sem o cabeçalho X-API-KEY, ela chega sem corpo.
application/json
{
  "error": "unauthorized",
  "message": "Credenciais de API inválidas."
}
403A chave autenticou, mas não tem o escopo que a rota exige, ou o plano não inclui o recurso.
application/json
{
  "error": "forbidden",
  "message": "A chave de API não tem acesso a esta rota: falta o escopo exigido, ou a rota não aceita chave de API."
}
404O registro não existe nesta empresa.
application/json
{
  "error": "not_found",
  "message": "Registro não encontrado."
}
429O limite de requisições por minuto foi atingido. Aguarde o tempo do cabeçalho Retry-After.
application/json
{
  "error": "too_many_requests",
  "message": "Muitas requisições com esta chave de API. Aguarde o fim da janela e tente novamente."
}
curl -X GET "https://api.guria.io/api/v1/messages/conversations/{conversationId}?page=1&pageSize=50" \
  -H "X-API-KEY: $GURIA_API_KEY" \
  -H "X-API-SECRET: $GURIA_API_SECRET"
Resposta · 200
[
  {
    "id": "1d7a3f9c-2b6e-4c8d-a5f1-7e0b4d2c9a63",
    "businessId": "2ea7ad0d-8e13-4008-9fd8-7c92fe8677f2",
    "conversationId": "3c8e1a5d-7b2f-4d6a-9e0c-5a1f8b3d7e29",
    "phoneNumberId": "5f0c2a1e-7d4b-4c8a-9e21-3b6d8f0a4c57",
    "contactId": "af147888-ebb0-4ec9-92e5-da66cd561461",
    "wabaMessageId": "wamid.HBgNNTUxMTk4ODg4Nzc3NxUCABIYFjNFQjBDNzY1QTkxRjRBMkQ4RTAA",
    "provider": "MetaWaba",
    "direction": "Inbound",
    "type": "Text",
    "status": "Read",
    "mediaUrl": null,
    "text": "Boa tarde! Meu pedido já saiu?",
    "caption": null,
    "fileName": null,
    "replyToWabaMessageId": null,
    "createdAt": "2026-11-25T17:38:51.204417Z",
    "sentAt": "2026-11-25T17:38:50Z",
    "deliveredAt": null,
    "readAt": null,
    "errorCode": null,
    "errorMessage": null,
    "contact": {
      "id": "af147888-ebb0-4ec9-92e5-da66cd561461",
      "name": "Fulano de Tal",
      "phoneNumber": "5511988887777",
      "profileImageUrl": null
    },
    "reactions": []
  },
  {
    "id": "9e4b7c2a-6d1f-4a3e-8b5c-0f7d2a9e6c41",
    "businessId": "2ea7ad0d-8e13-4008-9fd8-7c92fe8677f2",
    "conversationId": "3c8e1a5d-7b2f-4d6a-9e0c-5a1f8b3d7e29",
    "phoneNumberId": "5f0c2a1e-7d4b-4c8a-9e21-3b6d8f0a4c57",
    "contactId": "af147888-ebb0-4ec9-92e5-da66cd561461",
    "wabaMessageId": "wamid.HBgNNTUxMTk4ODg4Nzc3NxUCABEYEjZDMUQ0RjNBOEIyRTdDOTUwAA==",
    "provider": "MetaWaba",
    "direction": "Outbound",
    "type": "Text",
    "status": "Delivered",
    "mediaUrl": null,
    "text": "Oi, Fulano! Seu pedido saiu para entrega e chega hoje até as 18h.",
    "caption": null,
    "fileName": null,
    "replyToWabaMessageId": null,
    "createdAt": "2026-11-25T17:40:03.511902Z",
    "sentAt": "2026-11-25T17:40:04Z",
    "deliveredAt": "2026-11-25T17:40:06Z",
    "readAt": null,
    "errorCode": null,
    "errorMessage": null,
    "contact": {
      "id": "af147888-ebb0-4ec9-92e5-da66cd561461",
      "name": "Fulano de Tal",
      "phoneNumber": "5511988887777",
      "profileImageUrl": null
    },
    "reactions": []
  }
]