Skip to main content
POST
/
api
/
sessions
/
{session}
/
logout
Logout from the session
curl --request POST \
  --url https://{host}/api/sessions/{session}/logout \
  --header 'apikey: <api-key>'
{
  "success": true,
  "message": "Logout performed successfully",
  "session": "my-session"
}

Description

This endpoint disconnects the WhatsApp session, removing authentication on the mobile device. After logout, it will be necessary to scan the QR Code again to reconnect. The session remains registered in the system, but without authentication.

URL Parameters

session
string
required
Unique session ID to be disconnected
{
  "success": true,
  "message": "Logout performed successfully",
  "session": "my-session"
}

Status Codes

  • 200 - Logout performed successfully
  • 400 - Invalid parameters
  • 404 - Session not found
  • 409 - Session is not authenticated

Usage Example

curl -X POST https://api.wappfy.com.br/api/sessions/my-session/logout

Authorizations

apikey
string
header
required

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

Path Parameters

session
string
required

The session name (instanceName) you want to logout from

Response

201 - application/json
name
string
required

Session name (instanceName)

Example:

"my-session"

status
enum<string>
required
Available options:
STOPPED,
STARTING,
SCAN_QR_CODE,
WORKING,
FAILED
config
object
I