WhatsApp Gateway
API referenceContacts

Get one contact

Returns everything stored for one contact, addressed by its `lid` (WhatsApp's stable per-account identifier for a person): their name, whether you have a direct chat with them, and every group you have seen them in — including their nickname and role in each group. Served entirely from **stored** data, so no live WhatsApp connection is needed. **Auth:** requires the `read` capability. **Errors:** `404` (`not_found`) if the session does not exist, is not owned by the caller's organization, or no contact with the given `lid` is stored for that session.

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

Authorization

AuthorizationBearer <token>

Send Authorization: Bearer <token>. The router accepts two kinds of token and tries each in turn: a frontend-minted login JWT (verified against the frontend JWKS; the person's org + role are read from it), or an api-key for a script/service (carrying a fixed set of gateway permissions). The bearerFormat: JWT label describes the person-login case.

In: header

Path Parameters

session*string

The WhatsApp session id that owns the stored contact.

lid*string

The contact's LID — WhatsApp's stable per-account identifier for a person. Served from stored data, so the value must already be known to this session (e.g. from a prior list response).

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"  }}