> ## Documentation Index > Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt > Use this file to discover all available pages before exploring further. # Delete User > Permanently deletes an existing user from your workspace. Permission required: `delete-user` ### Changelog | Version | Description | | ---------------- | ------------| |3.7.0 | Added `confirmRelinquish` to the payload. | |0.35.0 | Added | ## OpenAPI ````json POST /api/v1/users.delete { "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "User Management" }, "servers": [ { "url": "https://apiexplorer.support.rocket.chat" } ], "tags": [ { "name": "LDAP" }, { "name": "Permissions" }, { "name": "Roles" }, { "name": "Users" }, { "name": "SAML" } ], "paths": { "/api/v1/users.delete": { "post": { "tags": [ "Users" ], "summary": "Delete User", "description": "Permanently deletes an existing user from your workspace. Permission required: `delete-user`\n\n### Changelog\n| Version | Description |\n| ---------------- | ------------|\n|3.7.0 | Added `confirmRelinquish` to the payload. |\n|0.35.0 | Added |", "operationId": "post-api-v1-users.delete", "parameters": [ { "$ref": "#/components/parameters/Auth-Token" }, { "$ref": "#/components/parameters/UserId" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "userId" ], "properties": { "userId": { "type": "string", "example": "BsNr28znDkG8aeo7W", "description": "The `userId` of the user. Alternatively, you can use the `username` property and value." }, "confirmRelinquish": { "type": "boolean", "description": "Deletes the user, even if they are the last owner of a room. By default, it is set to `false`.", "default": "false" } } }, "examples": { "Example": { "value": { "userId": "BsNr28znDkG8aeo7W", "confirmRelinquish": "true" } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "deletedRooms": { "description": "The rooms deleted as part of the user deletion process.", "type": "array", "items": { "type": "object" } } } }, "examples": { "Example": { "value": { "success": "true", "deletedRooms": [] } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" }, "errorType": { "type": "string" } } }, "examples": { "Example": { "value": { "success": "false", "error": "The required \"userId\" or \"username\" param was not provided [error-user-param-not-provided]", "errorType": "error-user-param-not-provided" } } } } } }, "401": { "$ref": "#/components/responses/authorizationError" }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" } } }, "examples": { "Permission Error": { "value": { "success": "false", "error": "unauthorized" } } } } } } } } } }, "components": { "parameters": { "Auth-Token": { "name": "X-Auth-Token", "in": "header", "description": "The authenticated user token.", "required": "true", "schema": { "type": "string" }, "example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f" }, "UserId": { "name": "X-User-Id", "in": "header", "description": "The authenticated user ID.", "required": "true", "schema": { "type": "string" }, "example": "rbAXPnMktTFbNpwtJ" } }, "responses": { "authorizationError": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "message": { "type": "string" } } }, "examples": { "Authorization Error": { "value": { "status": "error", "message": "You must be logged in to do this." } } } } } } } } } ````