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 |
The authToken of the authenticated user.
The userId of the authenticated user.
{
"channelId": "6513afeda2f73c7460e18c86"
}{
"channelName": "messages"
}The channel's ID. Provide either channelId or channelName, but not both.
The channel's name. Provide either channelName or channelId, but not both.
The channel's ID. Provide either channelId or channelName, but not both.
The channel's name. Provide either channelName or channelId, but not both.
The channel's ID. Provide either channelId or channelName, but not both.
The channel's name. Provide either channelName or channelId, but not both.
OK
{
"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
}Unauthorized
{
"status": "error",
"message": "You must be logged in to do this."
}Forbidden
{
"success": false,
"error": "unauthorized"
}