WhatsApp Gateway
API referenceContacts

Get one contact

GET
/api/v1/sessions/{session}/contacts/{lid}

Returns stored data for one contact by LID.

Requires read.

Errors: not_found if session/contact is missing or inaccessible.

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 that owns stored contact data.

Example"sess_01HZX"
lid*string

Contact LID from stored data.

Example"123456789@lid"

Response Body

application/json

application/json

curl -X GET "https://example.com/api/v1/sessions/sess_01HZX/contacts/123456789@lid"
{  "dm": true,  "groups": [    {      "jid": "string",      "lastSeen": 0,      "name": "string",      "role": "string",      "tag": "string"    }  ],  "identity": {    "businessName": "Acme Corp",    "firstSeenAt": 1719662400000,    "id": 1024,    "lid": "205227043110953@lid",    "name": "Alice",    "phoneJid": "6281234567890@s.whatsapp.net",    "phoneNumber": "6281234567890",    "updatedAt": 1719662400000  }}
{  "error": {    "code": "not_found",    "details": {      "property1": null,      "property2": null    },    "message": "session not found"  }}