> ## 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. # Create a New Team > Create a new public or private team in the workspace. Permission required: `create-team`. When you create a team from an existing room by passing `room.id`, you also need the `edit-room` permission for that room. ### Changelog | Version | Description | | ------- | ----------- | | 8.7.0 | Enforced room permission checks when creating a team from an existing room. | | 3.13.0 | Added | ## OpenAPI ````json POST /api/v1/teams.create { "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.create": { "post": { "tags": [ "Teams" ], "summary": "Create a New Team", "description": "Create a new public or private team in the workspace.\n\nPermission required: `create-team`. When you create a team from an existing room by passing `room.id`, you also need the `edit-room` permission for that room.\n\n### Changelog\n| Version | Description |\n| ------- | ----------- |\n| 8.7.0 | Enforced room permission checks when creating a team from an existing room. |\n| 3.13.0 | Added |", "operationId": "post-api-v1-teams.create", "parameters": [ { "$ref": "#/components/parameters/Auth-Token" }, { "$ref": "#/components/parameters/UserId" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The team name." }, "type": { "type": "integer", "description": "Privacy of the team (0 - Public, 1 - Private)." }, "members": { "type": "array", "description": "The user IDs to add to the team when it is created.", "items": { "type": "string" } }, "room": { "type": "object", "properties": { "id": { "type": "string", "description": "The ID of an existing room to use as the team's main room." }, "readOnly": { "type": "boolean" } } }, "sidepanel": { "type": "object", "description": "List the team's channels or discussions to be displayed in the sidepanel.", "properties": { "items": { "type": "array", "description": "The options are `discussions` and `channels`.", "items": { "type": "string", "example": "[\"discussions\", \"channels\"]" } } } }, "owner": { "type": "string", "description": "Set the owner of the team." } }, "required": [ "name", "type" ] }, "examples": { "Create a public team": { "value": { "name": "teamName", "type": 0, "members": [ "8dugqGhuRvCBLdZft" ], "room": { "readOnly": true }, "sidepanel": { "items": [ "discussions", "channels" ] } } }, "Create a team from an existing room": { "value": { "name": "teamName", "type": 0, "room": { "id": "6513afeda2f73c7460e18c86" } } } } } } }, "responses": { "200": { "description": "OK\n\nNote that the `roomId` is main room ID of the team.", "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": { "Team created": { "value": { "team": { "_id": "651619e3a2f73c7460e18cc5", "name": "teamName", "type": 0, "createdAt": "2023-09-29T00:27:15.189Z", "createdBy": { "_id": "rbAXPnMktTFbNpwtJ", "username": "roxie" }, "_updatedAt": "2023-09-29T00:27:15.189Z", "roomId": "651619e3a2f73c7460e18cc7" }, "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 room permissions": { "value": { "success": false, "error": "forbidden" } } } } } } } } } }, "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": { "success": { "type": "boolean" }, "error": { "type": "string" } } }, "examples": { "Authorization Error": { "value": { "success": false, "error": "You must be logged in to do this." } } } } } } } } } ````