Skip to main content
DELETE
Disconnect or delete a number
One endpoint, two very different outcomes. The logout_only query parameter decides which.
Read this before you call it. Deleting is permanent: the instance_id stops working forever, and anything in your code holding it will start returning 404 instance_not_found.

The two modes

Disconnect — logout_only=true

Signs WhatsApp out but keeps the instance.
  • instance_id stays valid
  • Reconnect by scanning again
  • Nothing to change in your code
Returns { "status": "close", "disconnected": true }.

Delete — no parameter

Removes the instance permanently.
  • instance_id stops working
  • You would have to create a new one and redeploy
  • Frees the slot on your account
Returns { "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?

If a number has simply gone offline, you usually need neither. Just re-scan the QR on the existing instance — see If your number disconnects.

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

apikey
string
header
required

Your API key, sent in an apikey request header. Never in the URL, never as a Bearer token.

Path Parameters

id
string<uuid>
required

The instance_id of one of your numbers.

Query Parameters

logout_only
enum<string>

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

Response

Disconnected or deleted.

success
boolean
data
object
request_id
string<uuid>