WhatsApp Gateway
API referenceSessions

Delete a session

DELETE
/api/v1/sessions/{session}

Permanently remove the session row and related session state.

If a number is still attached, call :logout first for clean detachment.

Requires manage capability.

Errors: not_found (404), unauthorized (401), forbidden (403).

Returns 204 No Content on success.

Authorization

AuthorizationBearer <token>

Send Authorization: Bearer <token>. The token can be a login JWT from the frontend or an api-key for a script. JWT access comes from the person's organization role. Api-key access comes from the permissions saved on the key.

In: header

Path Parameters

session*string

Session ID within your organization. Unknown or cross-organization sessions return not_found (404).

Example"sess_01HZX8K3M9"

Response Body

application/json

curl -X DELETE "https://example.com/api/v1/sessions/sess_01HZX8K3M9"
Empty
{  "error": {    "code": "not_found",    "details": {      "property1": null,      "property2": null    },    "message": "session not found"  }}