Skip to Content
Wazend

Presence

Control and query WhatsApp presence with Wazend: online, offline, typing, recording and more.

Get presence information (online, offline with last seen, typing) from a contact if they share their presence information.

I don't receive notifications on my phone

You need to send offline after each presence you send (WhatsApp doesn't send notifications to the device if a web client is active).

Set presence

POST /api/{session}/presence
Body
{
  "chatId": "5215551234567@c.us",
  "presence": "typing"
}

Possible presence states:

  • online — available (without chatId).
  • offline — away (without chatId).
  • typing — typing (requires chatId).
  • recording — recording (requires chatId).
  • paused — clears the state after typing (requires chatId).

Get presence from a chat

GET /api/{session}/presence/{chatId}
Response
{
  "id": "5215551234567@c.us",
  "presences": [
    {
      "participant": "5215551234567@c.us",
      "lastKnownPresence": "online",
      "lastSeen": null
    }
  ]
}

Subscribe to presence

Subscribe to receive presence updates through the presence.update webhook:

POST /api/{session}/presence/{chatId}/subscribe

Get presence from all chats

GET /api/{session}/presence

Returns the presence of groups and personal chats. lastSeen contains the Unix timestamp of the last connection; lastKnownPresence can be offline, online, typing, recording or paused.

Typing indicator

You can use POST /api/startTyping and POST /api/stopTyping as shortcuts for presence=typing and presence=paused (see Typing indicator).

Events

Subscribe to the presence.update webhook to receive the most recent presence. See the payload details in Events.