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
Example 1
{
"roomId": "JZ8Y2dLfYhsg323Rf"
}object
roomId
string Required
Enter the private channel that you want to convert to a private team.
ExampleJZ8Y2dLfYhsg323Rf
Responses
200
OK
Success
{
"team": {
"_id": "6172b15bc563fc000acc462e",
"name": "ddd",
"type": 1,
"createdAt": "2021-10-22T12:40:59.928Z",
"createdBy": {
"_id": "d26x6zSkaPSe5gCyy",
"username": "rod"
},
"_updatedAt": "2021-10-22T12:40:59.928Z",
"roomId": "h3HLZkQdrWCPg2RN7"
},
"success": true
}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