Instance
Logout Instance
Forces a WhatsApp logout and disconnects the device, while keeping the instance record
DELETE
Logout Instance
Auth:
TokenAccount or TokenInstance • Rate-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 futureconnect (with a new QR).
Example
Sends aDELETE 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.
Success response
200 OK
Path parameters
Instance name.
Headers
TokenAccount or TokenInstance.
Errors
| HTTP | error.message | When |
|---|---|---|
| 401 | Invalid token | Token missing or invalid. |
| 404 | Instance not found | Name does not exist. |
| 429 | Rate limit exceeded. Try again later. | More than 100 req/min. |
| 500 | Failed to logout instance | Internal failure. |
Notes
After logout,
reconnect no longer works, the whatsmeow session is wiped. Use connect to generate a new QR.Next
Connect again
Generate a new QR to link another device.
Delete instance
To remove everything permanently.