Disconnect or delete a number
Instances
Disconnect or delete a number
DELETE /v1/instances/ — sign WhatsApp out, or remove the instance entirely.
DELETE
Disconnect or delete a number
One endpoint, two very different outcomes. The
logout_only query parameter decides which.
The two modes
Disconnect — logout_only=true
Signs WhatsApp out but keeps the instance.
instance_idstays valid- Reconnect by scanning again
- Nothing to change in your code
{ "status": "close", "disconnected": true }.Delete — no parameter
Removes the instance permanently.
instance_idstops working- You would have to create a new one and redeploy
- Frees the slot on your account
{ "deleted": true }.Exactly what each value does
The flag is never guessed at. A value we cannot read is refused, and nothing on your account changes.If you are building the query string from a variable, this is the case that matters:
?logout_only=${flag} with an undefined flag sends the literal text undefined, and that now returns a 400 instead of destroying the instance.Which one do you want?
Examples
Disconnect, keep the instance
Delete permanently
Node.js — never let a falsy variable decide
Deleting or disconnecting a number does not credit anything back for the day it was already active. Reconnecting the same number later the same day costs nothing extra.
Authorizations
Your API key, sent in an apikey request header. Never in the URL, never as a Bearer token.
Path Parameters
The instance_id of one of your numbers.
Query Parameters
true, 1, yes or on (any capitalisation) disconnect WhatsApp and KEEP the instance. false, 0, no or off delete it, as does omitting the parameter entirely. Any other value — including an empty one, and the parameter sent twice — returns 400 invalid_request and changes nothing.
Available options:
true, 1, yes, on, false, 0, no, off 
