Documentation Index
Fetch the complete documentation index at: https://mintlify.com/jihvijhojhviihogyuvi/whatsapp-api/llms.txt
Use this file to discover all available pages before exploring further.
POST /api/logout performs a graceful teardown of the active WhatsApp Web session. It calls client.logout() to sign the device out of the Linked Devices list on the WhatsApp account, then calls client.destroy() to close the underlying Chrome browser instance. Once the call completes, all internal state is reset to its initial stopped values — the client reference, QR data, ready flag, and account info are all cleared.
Endpoint
Behavior
The logout sequence runs these steps in order:client.logout()— deregisters this session from the WhatsApp account’s Linked Devices list.client.destroy()— shuts down the Puppeteer/Chrome process.- Internal state reset:
state→"stopped"ready→falseclient→nulllastQr→nullinfo→null
{ok: true} without error.
Response Fields
Always
true on a successful logout.