Add existing rooms to a team.
Permission required: move-room-to-team
Rooms moved into the team lose their ABAC attributes. Each removal is recorded in the ABAC audit log as an abac.object.attributes.removed event for the room, with reason api and change all-deleted. If a room has attributes, you also need the abac-management and manage-abac-admin-rooms permissions or edit-room-abac-attributes in that room. Otherwise the request fails with error-abac-not-authorized-to-modify-room before anything changes.
If you are not a member of a private room in rooms, the request fails with invalid-room and no room is moved, even with administrator permissions.
Changelog
| Version | Description |
|---|---|
| 9.0.0 | Moving a room into a team removes its ABAC attributes. |
The authToken of the authenticated user.
The userId of the authenticated user.
{
"teamId": "607e0d9b49d493189836bfac",
"rooms": [
"8Z7eRsibvD5AANfmK"
]
}Enter the team ID to which you want to add the rooms. Alternatively, enter the teamName parameter and provide the team's name as the value.
The IDs of the rooms to be added to the team.
OK
{
"rooms": [
{
"_id": "JKa7R9zu2DinBhBN9",
"fname": "Livestream",
"customFields": {},
"description": "",
"broadcast": false,
"encrypted": false,
"federated": false,
"name": "Livestream",
"t": "c",
"msgs": 15,
"usersCount": 3,
"u": {
"_id": "rbAXPnMktTFbNpwtJ",
"username": "roxie"
},
"ts": "2023-02-22T17:15:26.989Z",
"ro": false,
"default": false,
"sysMes": true,
"_updatedAt": "2023-09-26T01:05:39.641Z",
"lm": "2023-09-14T12:06:00.594Z",
"lastMessage": {
"_id": "rtf5JoPLQup3X7Aof",
"t": "videoconf",
"msg": "",
"groupable": false,
"blocks": [
{
"type": "video_conf",
"blockId": "6502f728a2f73c7460df6f71",
"callId": "6502f728a2f73c7460df6f71",
"appId": "videoconf-core"
}
],
"ts": "2023-09-14T12:06:00.594Z",
"u": {
"_id": "rbAXPnMktTFbNpwtJ",
"username": "test.test",
"name": "test test"
},
"rid": "JKa7R9zu2DinBhBN9",
"_updatedAt": "2023-09-14T12:06:00.685Z",
"urls": [],
"mentions": [],
"channels": []
},
"teamId": "63f3efc4b000b6b6d86704b2"
}
],
"success": true
}Bad Request
{
"success": false,
"error": "invalid-room"
}Unauthorized
{
"success": false,
"error": "You must be logged in to do this."
}