Skip to main content
POST
/
api
/
{session}
/
presence
Set session presence
curl --request POST \
  --url https://{host}/api/{session}/presence \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '{
  "chatId": "5511999999999@c.us",
  "presence": "offline"
}'
{
  "success": true,
  "message": "Presence updated successfully",
  "status": "AVAILABLE"
}

Description

This endpoint allows you to set the presence status of the WhatsApp session, controlling whether the account appears as available (online) or unavailable (offline) to other users.

URL Parameters

session
string
required
WhatsApp unique session ID

Body

{
  "status": "value"
}

Body Parameters

PropertyTypeRequiredDescription
statusstring✅ YesPresence status to be set. Accepted values: - AVAILABLE - Appears as available/online - UNAVAILABLE - Appears as unavailable/offline

Response

{
  "success": true,
  "message": "Presence updated successfully",
  "status": "AVAILABLE"
}

Status Codes

  • 200 - Presence updated successfully
  • 400 - Invalid parameters (status must be AVAILABLE or UNAVAILABLE)
  • 401 - Unauthorized
  • 404 - Session not found

Usage Example

curl -X POST https://api.wappfy.com.br/api/my-session/presence \
  -H "Content-Type: application/json" \
  -d '{
    "status": "AVAILABLE"
  }'

Notes

  • The AVAILABLE status will make the account appear as online to other users
  • The UNAVAILABLE status will make the account appear as offline
  • This setting can be useful for controlling the visibility of the automation’s presence

Authorizations

apikey
string
header
required

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

Path Parameters

session
string
required

Session name (instanceName)

Body

application/json
chatId
string
required

Chat ID - either group id or contact id

Example:

"5511999999999@c.us"

presence
enum<string>
required
Available options:
offline,
online,
typing,
recording,
paused
I