Skip to main content
DELETE
/
api
/
instance
/
logout
/
:instance
Logout Instance
curl --request DELETE \
  --url https://api.example.com/api/instance/logout/:instance \
  --header 'token: <token>'

Documentation Index

Fetch the complete documentation index at: https://docs.ryzeapi.cloud/llms.txt

Use this file to discover all available pages before exploring further.

Auth: TokenAccount or TokenInstanceRate-limit: Global (100/min) • Idempotent: yes

Description

Unlinks the device from WhatsApp (the equivalent of clicking “Log out” in WhatsApp Web) and closes the websocket. The instance record is not deleted, the token remains valid for a future connect (with a new QR).

Example

Sends a DELETE to the logout path to unlink the device from WhatsApp and close the WebSocket. The instance record is preserved, so the same token can be reused on a future call to connect.
curl -X DELETE "https://ryzeapi.cloud/api/instance/logout/my-instance" \
  -H "token: $Token_Instance"

Success response

200 OK
{
  "success": true,
  "message": "Instance logged out",
  "instance": {
    "status": "loggedout"
  }
}

Path parameters

instance
string
required
Instance name.

Headers

token
string
required
TokenAccount or TokenInstance.

Errors

HTTPerror.messageWhen
401Invalid tokenToken missing or invalid.
404Instance not foundName does not exist.
429Rate limit exceeded. Try again later.More than 100 req/min.
500Failed to logout instanceInternal failure.
{
  "success": false,
  "error": {
    "message": "Instance not found"
  }
}

Notes

After logout, reconnect no longer works, the whatsmeow session is wiped. Use connect to generate a new QR.
This does not delete the instance record. To remove it completely (including settings, webhooks, and data), use DELETE /api/instance/delete/:instance.

Next

Connect again

Generate a new QR to link another device.

Delete instance

To remove everything permanently.