Update a Team

Prev Next
Post
/api/v1/teams.update

Updates an existing team (name and type).

Permission required: edit-team

While ABAC is enabled, an ABAC-managed private team cannot be made public. The request fails with error-action-not-allowed and no change is applied, including a name change sent in the same request. While ABAC is disabled, making the team public removes the team room's ABAC attributes. In that case, you also need the abac-management and manage-abac-admin-rooms permissions or edit-room-abac-attributes in the team room.

Changelog

Version Description
9.0.0 Refused making an ABAC-managed team public while ABAC is enabled, with error-action-not-allowed. Making a team public while ABAC is disabled removes its ABAC attributes.
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
{
  "teamId": "ByehQjC44FwMeiLbX",
  "data": {
    "name": "newTeamName",
    "type": 1
  }
}
Expand All
object
teamId
string Required

The team ID.

data
object Required

The new team name and type (0 - public, 1 - private).

name
string
type
integer
Responses
200

OK

Success
{
  "success": true
}
object
success
boolean
400

Bad Request

ABAC-managed team cannot be made public
{
  "success": false,
  "error": "Changing an ABAC managed private room to public is not allowed [error-action-not-allowed]",
  "errorType": "error-action-not-allowed"
}
object
success
boolean
error
string
errorType
string
401

Unauthorized

Authorization Error
{
  "success": false,
  "error": "You must be logged in to do this."
}
object
success
boolean
error
string