Convert a Group to Team

Prev Next
Post
/api/v1/groups.convertToTeam

Convert a private channel to a team. Permissions required: create-team, edit-room

Changelog

Version Description
3.13.0 Added
Header parameters
X-Auth-Token
stringRequired

The authToken of the authenticated user.

ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired

The userId of the authenticated user.

ExamplerbAXPnMktTFbNpwtJ
Body parameters
object
teamName
string

Enter the team name. This parameter is required if teamId is not provided.

teamId
string

Enter the team ID. This parameter is required if teamName is not provided.

roomsToRemove
Array of string

The room IDs to delete along with the team.

string
Example8dugqGhuRvCBLdZft
Responses
200

OK

Success s
{
  "team": {
    "_id": "6172b15bc563fc000acc462e",
    "name": "ddd",
    "type": 1,
    "createdAt": "2021-10-22T12:40:59.928Z",
    "createdBy": {
      "_id": "d26x6zSkaPSe5gCyy",
      "username": "rodriq"
    },
    "_updatedAt": "2021-10-22T12:40:59.928Z",
    "roomId": "h3HLZkQdrWCPg2RN7"
  },
  "success": true
}
Expand All
object
team
object
_id
string
name
string
type
integer
createdAt
string
createdBy
object
_id
string
username
string
_updatedAt
string
roomId
string
success
boolean
400

Bad Request

Team name exists
{
  "success": false,
  "error": "team-name-already-exists"
}
Room name is required
{
  "success": false,
  "error": "The parameter \"roomId\" or \"roomName\" is required"
}
Room not found
{
  "success": false,
  "error": "The required \"roomId\" or \"roomName\" param provided does not match any group [error-room-not-found]",
  "errorType": "error-room-not-found"
}
object
success
boolean
error
string
401

Unauthorized

Authorization Error
{
  "status": "error",
  "message": "You must be logged in to do this."
}
object
status
string
message
string