Delete user
Requires UserDelete (root / Owner / SuperAdmin) or UserRemoveFromWorkspace (WorkspaceAdministrator, Administrator — their own workspace only, a strictly lower rank only). Removes the user from the CURRENT workspace — the membership, the roles, project and platform permissions of this workspace, and the sessions and personal API tokens bound to it; other workspaces are kept. When this was the last membership, the same cleanup runs and the account is soft-deleted. A super role (root / Owner / SuperAdmin) without X-Workspace-Id deletes nothing: the user is blocked in every workspace, exactly like PATCH {"isActive":false,"everywhere":true}. To delete the whole account use DELETE /api/v2/users/{id}/everywhere. A call on an already soft-deleted account hard-deletes it (UserDeleteDeleted).
Authorization
BearerAuthObject Machine tokens only: a personal API token or a product robot token (POST /api/v2/products/{uid}/robot-tokens). A session JWT here is 401 — the web app uses the b2t_access cookie.
In: header
Path Parameters
Response Body
application/json
curl -X DELETE "https://example.com/api/v2/users/0"{ "message": { "error": "You are not allowed to perform this action." }}