Skip to main content
DELETE
/
api
/
instance
/
delete
/
:instance
Delete Instance
curl --request DELETE \
  --url https://api.example.com/api/instance/delete/:instance \
  --header 'token: <token>'

Documentation Index

Fetch the complete documentation index at: https://docs.ryzeapi.cloud/llms.txt

Use this file to discover all available pages before exploring further.

Auth: TokenAccountRate-limit: Global (100/min) • Idempotent: yes
Irreversible operation. It logs out from WhatsApp, removes the whatsmeow session and wipes every record from the database (settings, webhook, websocket, chatwoot, settings, S3 and the instance itself). Back up anything you need beforehand.
Does not accept TokenInstance, an instance cannot ask for its own removal. Use the TokenAccount of the owner account.

Example

Sends a DELETE to the instance path using the TokenAccount. The operation is irreversible: it terminates the whatsmeow session, logs out from WhatsApp and removes every record from the database (settings, webhook, websocket, chatwoot, proxy, S3 and the instance itself).
curl -X DELETE "https://ryzeapi.cloud/api/instance/delete/my-instance" \
  -H "token: $Token_Account"

Success response

200 OK
{
  "success": true,
  "message": "Instance deleted",
  "instance": {
    "status": "deleted"
  }
}

Path parameters

instance
string
required
Name of the instance to delete.

Headers

token
string
required
Your TokenAccount (only the instance owner can delete it).

What happens on delete

  • If the instance was connected, RyzeAPI performs a WhatsApp logout (the device disappears from the linked-devices list on the phone).
  • Webhooks, WebSocket, Chatwoot integration and settings are removed.
  • All instance records are wiped from the database.
  • If you had S3 configured, files already uploaded to the bucket are not deleted, manage the bucket separately.

Errors

HTTPerror.messageWhen
401Invalid tokenToken missing, invalid or a TokenInstance (not accepted).
404Instance not foundName does not exist.
429Rate limit exceeded. Try again later.More than 100 req/min.
500Failed to delete instance: <reason>Internal failure during teardown.
{
  "success": false,
  "error": {
    "message": "Failed to delete instance: <reason>"
  }
}

Notes

After deletion, creating a new instance with the same name may occasionally conflict with the asynchronous whatsmeow cleanup. If that happens, wait a few seconds and try again.

Next

Create a new instance

Provisions a new one in its place, optionally with inline webhook, websocket and chatwoot.

Logout without deleting

If you only want to disconnect from WhatsApp while keeping the instance.