v1

latestOpenAPI 3.1.02026-07-1413113265.9 KB
client

[BETA] subscribe to and fetch current presence of a chat

Subscribes to presence updates for the given chat and returns the current state. Subsequent changes emit presence_update webhook events (if enabled in webhook settings).

Important — subscription model:

  • Presence in Web is subscription-based. You MUST call this action at least once per chat you want to track. Without a subscribe, the presence_update webhook never fires for that chat.
  • Calling this action again acts as a renewal. Subscriptions are lost on instance reconnect — re-subscribe after any 'ready' event if you want continuous tracking.
  • Privacy reciprocity: if the instance account hides its own last-seen in the settings, it cannot read others' last-seen either. Expect deny:true or hasData:false in that case.
  • High-frequency event — a single active chat can produce 10+ presence_update webhooks per minute. Debounce on your side.
  • Groups: chatstate is always null. Use typingParticipants and recordingParticipants instead. isOnline on a group = 'at least one member online'.

Note: This endpoint is currently in beta and may change without notice.

post/instances/{id}/client/action/get-chat-presence

Path parameters

idinteger required

Instance ID

Request body

chatIdstring required

Chat ID <countrycode_short><usernumber>@c.us or @g.us for groups

waitForDataboolean

If true, wait for the first server push before returning (up to timeoutMs). If false, return immediately — the returned presence.hasData may be false.

timeoutMsinteger

Maximum milliseconds to wait for the first server push when waitForData is true.

Example request

{
  "chatId": "50664083362@c.us"
}

Response

Presence fetched (presence may be null if the chat is unknown or the subscribe could not be confirmed within timeoutMs)

status'success' | 'error'

Example response

{
  "data": {
    "presence": {
      "id": "491701234567@c.us",
      "chatstate": "typing",
      "lastSeen": 1744632000
    }
  },
  "links": {
    "self": "https://waapi.app/api/v1/instances/1/client/action/get-chat-presence"
  },
  "status": "success"
}