API referenceChats
List chat messages
Returns stored messages for one chat.
Use limit and cursor to page older messages. Requires read capability.
Errors: not_found if chat or session is missing, forbidden if missing read.
AuthorizationBearer <token>
Send Authorization: Bearer <token>. The token can be a login JWT from the frontend or an api-key for a script. JWT access comes from the person's organization role. Api-key access comes from the permissions saved on the key.
In: header
Path Parameters
session*string
WhatsApp session id. Must belong to the caller organization.
Example
"01HF..."cid*string
Chat JID to read messages from.
Example
"6281234567890@s.whatsapp.net"Query Parameters
limit?integer
Page size. Missing or 0 uses 50, clamped to 1-200.
Format
int64Example
50cursor?string
Opaque pagination cursor from the previous response's nextCursor.
Example
""Response Body
application/json
application/json
curl -X GET "https://example.com/api/v1/sessions/01HF.../chats/6281234567890@s.whatsapp.net/messages"{ "data": [ { "ackLevel": 3, "body": "Hello there!", "chatJid": "6281234567890@s.whatsapp.net", "createdAt": 1719662400000, "deleted": false, "direction": "in", "edited": false, "error": "recipient not on WhatsApp", "fromMe": false, "hasMedia": false, "id": "3EB0C431C26A1916E07A", "media": { "filename": "invoice.pdf", "mimetype": "image/jpeg", "size": 204800 }, "mentionNames": { "205227043110953": "Alice" }, "mentions": [ "205227043110953@lid" ], "quotedMessageId": "3EB0C431C26A1916E001", "senderJid": "6281234567890@s.whatsapp.net", "senderLid": "205227043110953@lid", "senderName": "Alice", "sessionId": "01J9ZX8K2QHV0M3T6R7P4N5W8C", "status": "delivered", "timestamp": 1719662400000, "type": "text", "waMessageId": "3EB0C431C26A1916E07A" } ], "nextCursor": "string"}{ "error": { "code": "not_found", "details": { "property1": null, "property2": null }, "message": "session not found" }}