API referenceWhatsapp accounts
DELETE
/whatsapp/api/v1/accounts/{id}

Unlinks the device on the phone (unless provider_session_revoke=false; a number not connected right now is not unlinked there, WhatsApp drops an idle linked device after 30 days), erases its login and its stored chats, messages and contacts, and sends AccountStatus DELETED. 503 whatsapp-connecting for a moment during an update of Swarmhit: retry.

Authorization

X-API-KEY<token>

Your API key from the console (gw_live_…).

In: header

Path Parameters

id*string

A WhatsApp account id (wa_…).

Match^wa_[A-Za-z0-9_-]{8,64}$

Query Parameters

provider_session_revoke?string

true (default) also unlinks the device from the phone's Linked devices; false only deletes the number here and leaves the device listed on the phone.

Default"true"

Value in

  • "true"
  • "false"

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/whatsapp/api/v1/accounts/wa_Xk2pQ9rT4vW8yZ1a"
{  "object": "AccountDeleted"}