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

Prev Next
Post
/api/v1/channels.convertToTeam

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
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
Convert channel by ID
{
  "channelId": "6513afeda2f73c7460e18c86"
}
Convert channel by name
{
  "channelName": "messages"
}
object
channelId
string

The channel's ID. Provide either channelId or channelName, but not both.

channelName
string

The channel's name. Provide either channelName or channelId, but not both.

OneOf
object
object
channelId
string Required

The channel's ID. Provide either channelId or channelName, but not both.

channelName
string

The channel's name. Provide either channelName or channelId, but not both.

object
object
channelId
string

The channel's ID. Provide either channelId or channelName, but not both.

channelName
string Required

The channel's name. Provide either channelName or channelId, but not both.

Responses
200

OK

Channel converted to team
{
  "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
403

Forbidden

Missing channel permissions
{
  "success": false,
  "error": "unauthorized"
}
object
success
boolean
error
string