> ## 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 Room > Delete a room from the workspace. The following permissions are required: * `delete-c`: To delete a public room. * `delete-d`: To delete direct messages. * `delete-p`: To delete private rooms. * `delete-team`: To delete a team. * `delete-team-channel`: To delete a channel within a team, also requires the `delete-c` permission. * `delete-team-group`: To delete a private channel within a team, also requires the `delete-p` permission. > You can't use this endpoint to delete a team's main room. Use [Delete a Team endpoint](https://developer.rocket.chat/apidocs/delete-a-team) instead. ### Changelog | Version | Description | | ------- | --------------| | 5.4.0 | Added | ## OpenAPI ````json POST /api/v1/rooms.delete { "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "Rooms" }, "servers": [ { "url": "https://apiexplorer.support.rocket.chat" } ], "tags": [ { "name": "Channels" }, { "name": "Directory" }, { "name": "Groups" }, { "name": "Rooms" }, { "name": "Teams" }, { "name": "Room Invites" }, { "name": "Subscriptions" }, { "name": "ABAC" } ], "paths": { "/api/v1/rooms.delete": { "post": { "tags": [ "Rooms" ], "summary": "Delete Room", "description": "Delete a room from the workspace. The following permissions are required:\n* `delete-c`: To delete a public room.\n* `delete-d`: To delete direct messages.\n* `delete-p`: To delete private rooms.\n* `delete-team`: To delete a team.\n* `delete-team-channel`: To delete a channel within a team, also requires the `delete-c` permission.\n* `delete-team-group`: To delete a private channel within a team, also requires the `delete-p` permission.\n\n> You can't use this endpoint to delete a team's main room. Use [Delete a Team endpoint](https://developer.rocket.chat/apidocs/delete-a-team) instead.\n\n### Changelog\n| Version | Description |\n| ------- | --------------|\n| 5.4.0 | Added |", "operationId": "get-api-v1-rooms.delete", "parameters": [ { "$ref": "#/components/parameters/Auth-Token" }, { "$ref": "#/components/parameters/UserId" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "roomId" ], "properties": { "roomId": { "type": "string", "example": "ByehQjC44FwMeiLbX", "description": "The room ID that you want to delete." } } } } } }, "responses": { "200": { "$ref": "#/components/responses/trueSuccess" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" } } }, "examples": { "Example 1: Missing roomId": { "value": { "success": false, "error": "The 'roomId' param is required" } }, "Example 2: Missing Permission": { "value": { "success": true, "error": "string" } }, "Example 3: Cannot Delete Team Channel": { "value": { "success": false, "error": "Cannot delete a team channel [error-cannot-delete-team-channel]", "errorType": "error-cannot-delete-team-channel", "details": { "method": "eraseRoom" } } } } } } }, "401": { "$ref": "#/components/responses/authorizationError" } } } } }, "components": { "parameters": { "Auth-Token": { "name": "X-Auth-Token", "in": "header", "description": "The `authToken` of the authenticated user.", "required": true, "schema": { "type": "string" }, "example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f" }, "UserId": { "name": "X-User-Id", "in": "header", "description": "The `userId` of the authenticated user.", "required": true, "schema": { "type": "string" }, "example": "rbAXPnMktTFbNpwtJ" } }, "responses": { "trueSuccess": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } }, "examples": { "Success": { "value": { "success": true } } } } } }, "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." } } } } } } } } } ````