> ## 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. # Convert Channel to Team > Convert a channel to a team. Permissions required: `create-team`, `edit-room`. Both permissions are checked against the target channel, whether you identify it by `channelId` or `channelName`. ### Changelog | Version | Description | | ------- | ----------- | | 8.7.0 | Enforced room permission checks regardless of whether the channel is identified by ID or name. | | 3.13.0 | Added | ## OpenAPI ````json POST /api/v1/channels.convertToTeam { "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/channels.convertToTeam": { "post": { "tags": [ "Channels" ], "summary": "Convert Channel to Team", "description": "Convert a channel to a team.\n\nPermissions required: `create-team`, `edit-room`. Both permissions are checked against the target channel, whether you identify it by `channelId` or `channelName`.\n\n### Changelog\n| Version | Description |\n| ------- | ----------- |\n| 8.7.0 | Enforced room permission checks regardless of whether the channel is identified by ID or name. |\n| 3.13.0 | Added |", "operationId": "post-api-v1-channels.convertToTeam", "parameters": [ { "$ref": "#/components/parameters/Auth-Token" }, { "$ref": "#/components/parameters/UserId" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "channelId": { "type": "string", "description": "The channel's ID. Provide either `channelId` or `channelName`, but not both." }, "channelName": { "type": "string", "description": "The channel's name. Provide either `channelName` or `channelId`, but not both." } }, "oneOf": [ { "required": [ "channelId" ] }, { "required": [ "channelName" ] } ] }, "examples": { "Convert channel by ID": { "value": { "channelId": "6513afeda2f73c7460e18c86" } }, "Convert channel by name": { "value": { "channelName": "messages" } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "team": { "type": "object", "properties": { "_id": { "type": "string" }, "name": { "type": "string" }, "type": { "type": "integer" }, "createdAt": { "type": "string" }, "createdBy": { "type": "object", "properties": { "_id": { "type": "string" }, "username": { "type": "string" } } }, "_updatedAt": { "type": "string" }, "roomId": { "type": "string" } } }, "success": { "type": "boolean" } } }, "examples": { "Channel converted to team": { "value": { "team": { "_id": "65149c7ea2f73c7460e18cab", "name": "messages", "type": 0, "createdAt": "2023-09-27T21:19:58.972Z", "createdBy": { "_id": "rbAXPnMktTFbNpwtJ", "username": "roxie" }, "_updatedAt": "2023-09-27T21:19:58.972Z", "roomId": "6513afeda2f73c7460e18c86" }, "success": true } } } } } }, "401": { "$ref": "#/components/responses/authorizationError" }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" } } }, "examples": { "Missing channel permissions": { "value": { "success": false, "error": "unauthorized" } } } } } } } } } }, "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": { "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." } } } } } } } } } ````