Create a New Team
- Print
- DarkLight
- PDF
Create a New Team
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Post
/api/v1/teams.create
Creates a new team.
Permission required: create-team permission
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
{
"name": "teamName",
"type": 0,
"members": [
"8dugqGhuRvCBLdZft"
],
"room": {
"readOnly": true
},
"sidepanel": {
"items": [
"discussions",
"channels"
]
}
}
object
name
string Required
The team name.
type
integer Required
Privacy of the team (0 - Public, 1 - Private).
members
Array of string
The user ids to add to the team when it is created.
string
room
object
readOnly
boolean
sidepanel
object
List the team's channels or discussions to be displayed in the sidepanel.
items
Array of string
The options are discussions
and channels
.
string
Example["discussions", "channels"]
owner
string
Set the owner of the team.
Responses
200
OK
Note that the roomId
is main room ID of the team.
Success
{
"team": {
"_id": "651619e3a2f73c7460e18cc5",
"name": "teamName",
"type": 0,
"createdAt": "2023-09-29T00:27:15.189Z",
"createdBy": {
"_id": "rbAXPnMktTFbNpwtJ",
"username": "roxie"
},
"_updatedAt": "2023-09-29T00:27:15.189Z",
"roomId": "651619e3a2f73c7460e18cc7"
},
"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
401
Unauthorized
Authorization Error
{
"status": "error",
"message": "You must be logged in to do this."
}
object
status
string
message
string
Was this article helpful?