---
title: "[BETA] subscribe to and fetch current presence of a chat"
method: POST
path: "/instances/{id}/client/action/get-chat-presence"
tags: ["client"]
---

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

`POST /instances/{id}/client/action/get-chat-presence`

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.

## Path parameters

- `id` integer, required

## Request body

- object
  - `chatId` string, required — Chat ID <countrycode_short><usernumber>@c.us or @g.us for groups
  - `waitForData` boolean — If true, wait for the first server push before returning (up to timeoutMs). If false, return immediately — the returned presence.hasData may be false.
  - `timeoutMs` integer — Maximum milliseconds to wait for the first server push when waitForData is true.

## Response `200`

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

- object
  - `data` object
    - `presence` ChatPresence — Presence state of a chat. Returned by get-chat-presence action and included in presence_update webhook events. Null fields carry semantic meaning — read the field descriptions before interpreting them.
      - `id` string — Serialized chat id this presence refers to.
      - `isGroup` boolean — Whether this presence refers to a group chat.
      - `isOnline` boolean — Whether the contact (or any group member) is currently online. For groups this is an aggregate across all members.
      - `chatstate` 'available' | 'typing' | 'recording_audio' | 'unavailable', nullable — Current typing/recording state. Null for group chats — use typingParticipants and recordingParticipants instead. The service auto-reverts typing/recording to available/unavailable after ~25 seconds of inactivity, which produces a second presence_update event.
      - `lastSeen` integer, nullable — Unix timestamp (seconds) of when the contact was last seen. Only populated when chatstate is 'unavailable' AND deny is false. Null in all other cases — do not interpret null as 'never seen'.
      - `deny` boolean — True when the peer has explicitly blocked last-seen visibility for this account. Typing/online state may still be visible — deny only affects lastSeen.
      - `typingParticipants` string[] — Group chats only. Serialized JIDs of members currently typing. Empty for 1:1 chats.
      - `recordingParticipants` string[] — Group chats only. Serialized JIDs of members currently recording audio. Empty for 1:1 chats.
      - `hasData` boolean — False means subscription is active but the service has not yet pushed any state. Do NOT interpret hasData:false as 'offline' — it means 'unknown'.
      - `isSubscribed` boolean — Whether this chat is currently subscribed to presence updates.
  - `links` object
    - `self` string
  - `status` 'success' | 'error'

## Other responses

- `401` — Unauthorized — invalid or missing bearer token
- `403` — Forbidden — insufficient permissions or account blocked
- `404` — Not found — instance does not exist or does not belong to you
- `409` — Conflict — instance is not ready
- `422` — Validation error — invalid or missing request parameters
- `429` — Too many requests — rate limit exceeded

---

[API](https://skmtc.net/waapi/apis/waapi-api.md) · [All operations](https://skmtc.net/waapi/apis/waapi-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/waapi/waapi-api/revisions/1e2cc7c12090/schema)
