Convert Channel to Team

Prev Next
Post
/api/v1/channels.convertToTeam

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

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
Example
{
  "channelId": "6513afeda2f73c7460e18c86"
}
object
channelId
string Required

The channel's ID. Alternatively, enter the channelName parameter and provide the channel's name as the value.

Responses
200

OK

Success
{
  "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
}
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
401

Unauthorized

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