WhatsApp Gateway
API referenceChannels

List stored channel messages

GET
/api/v1/sessions/{session}/channels/{jid}/messages

List messages already stored on the gateway for this channel, newest first.

Pagination uses limit (default 50, 1-200) and cursor (nextCursor from response).

Safe, side-effect-free read.

Requires send capability.

Errors: forbidden (403), not_found (404).

Authorization

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

Session ID whose stored channel messages are being queried.

Example"01HX..."
jid*string

Channel JID, for example 120363012345678901@newsletter.

Example"120363012345678901@newsletter"

Query Parameters

limit?integer

Max messages to return. Omit or set 0 to use default 50. Accepted range is 1-200.

Formatint64
Example50
cursor?string

Opaque cursor for pagination. Omit to fetch first page; pass response nextCursor to fetch next.

Example""

Response Body

application/json

application/json

curl -X GET "https://example.com/api/v1/sessions/01HX.../channels/120363012345678901@newsletter/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"  }}