> ## 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 a Team > Removes a team. Permission required: `delete-team` The deletion completes even if the team's main room no longer exists, for example after an interrupted deletion. In that case, the main room is skipped, the team is removed, and the team name becomes available again. You can retry an interrupted deletion with this endpoint. ### Changelog | Version | Description | | ------- | ----------- | | 8.9.0 | Succeeds when the main room is missing. | | 3.13.0 | Added | ## OpenAPI ````json POST /api/v1/teams.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/teams.delete": { "post": { "tags": [ "Teams" ], "summary": "Delete a Team", "description": "Removes a team. \n\nPermission required: `delete-team`\n\nThe deletion completes even if the team's main room no longer exists, for example after an interrupted deletion. In that case, the main room is skipped, the team is removed, and the team name becomes available again. You can retry an interrupted deletion with this endpoint.\n\n### Changelog\n| Version | Description |\n| ------- | ----------- |\n| 8.9.0 | Succeeds when the main room is missing. |\n| 3.13.0 | Added |", "operationId": "post-api-v1-teams.delete", "parameters": [ { "$ref": "#/components/parameters/Auth-Token" }, { "$ref": "#/components/parameters/UserId" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "teamName": { "type": "string", "description": "Enter the team name. This parameter is required if `teamId` is not provided." }, "teamId": { "type": "string", "description": "Enter the team ID. This parameter is required if `teamName` is not provided." }, "roomsToRemove": { "type": "array", "description": "The room IDs to delete along with the team.", "items": { "type": "string", "example": "8dugqGhuRvCBLdZft" } } } }, "examples": { "Example": { "value": { "teamId": "mLGZGywfmLGZGywf", "roomsToRemove": [ "8dugqGhuRvCBLdZft" ] } } } } } }, "responses": { "200": { "$ref": "#/components/responses/trueSuccess" }, "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." } } } } } } } } } ````