Skip to main content
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

session
string
required
WhatsApp unique session ID
chatId
string
required
ID of the chat/contact in format 5511999999999@s.whatsapp.net

Response

Status Codes

  • 200 - Subscription created successfully
  • 400 - Invalid parameters
  • 401 - Unauthorized
  • 404 - 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

Authorizations

apikey
string
header
required

Your Wappfy API key (get it at dash.wappfy.com.br)

Path Parameters

chatId
string
required

Conversation ID

Response

201 - undefined