Subscribe to presence events for the conversation
Presence
Subscribe to Chat Presence Events
Subscribe to receive presence notifications (online/offline) of a specific chat
POST
Subscribe to presence events for the conversation
Description
This endpoint allows you to subscribe to receive presence updates (online/offline status) of a specific contact. After subscription, you will receive events whenever the contact goes online or offline.URL Parameters
WhatsApp unique session ID
ID of the chat/contact in format
5511999999999@s.whatsapp.netResponse
Status Codes
200- Subscription created successfully400- Invalid parameters401- Unauthorized404- Chat/Session not found
Usage Example
Notas
- After subscribing, you will receive presence events through the event stream
- Use the
/api/events/stream/{sessionId}endpoint to receive events in real time - Events will inform when the contact goes online (
AVAILABLE) or offline (UNAVAILABLE) - Useful for implementing online status indicators in applications
