WhatsApp Gateway
API referenceChats

Get a chat

GET
/api/v1/sessions/{session}/chats/{cid}

Returns one chat from local storage.

Requires read capability.

Errors: not_found if the chat is missing, forbidden if missing read.

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

WhatsApp session id. Must belong to the caller organization.

Example"01HF..."
cid*string

Chat JID (for example 628...@s.whatsapp.net or 120...@g.us).

Example"6281234567890@s.whatsapp.net"

Response Body

application/json

application/json

curl -X GET "https://example.com/api/v1/sessions/01HF.../chats/6281234567890@s.whatsapp.net"
{  "aliases": [    "205227043110953@lid"  ],  "archived": false,  "id": 3344,  "jid": "6281234567890@s.whatsapp.net",  "lastMessageAt": 1719662400000,  "mutedUntil": 1751198400000,  "name": "Alice",  "pinned": false,  "sessionId": "01J9ZX8K2QHV0M3T6R7P4N5W8C",  "type": "dm",  "unreadCount": 3}
{  "error": {    "code": "not_found",    "details": {      "property1": null,      "property2": null    },    "message": "session not found"  }}