HTTP Method | URL | Requires Auth |
---|
POST | /api/v1/teams.addRooms | yes |
{% hint style="info" %}
Permission required: add-team-channel
{% endhint %}
Key | Example Value | Description |
---|
teamId * or teamName * | ByehQjC44FwMeiLbX or team1 | The team ID or the team name. You must enter either one of the parameters. |
rooms * | ["8dugqGhuRvCBLdZft"] | The IDs of the rooms to be added to the team. |
curl -H 'X-Auth-Token: 8h2mKAwxB3AQrFSjLVKMooJyjdCFaA7W45sWlHP8IzO' \
-H 'X-User-Id: 8dugqGhuRvCBLdZft' \
-H 'Content-Type: application/json' \
http://localhost:3000/api/v1/teams.addRooms \
-d '{
"teamId": "607e0d9b49d493189836bfac",
"rooms": ["8Z7eRsibvD5AANfmK"]}'
{
"rooms": [
{
"_id": "8Z7eRsibvD5AANfmK",
"name": "channelToAddToTeam",
"fname": "channelToAddToTeam",
"t": "c",
"msgs": 0,
"usersCount": 1,
"u": {
"_id": "8dugqGhuRvCBLdZft",
"username": "some.username"
},
"customFields": {},
"description": "",
"broadcast": false,
"encrypted": false,
"ts": "2021-04-27T19:59:07.258Z",
"ro": false,
"_updatedAt": "2021-04-27T19:59:07.313Z",
"teamId": "607e0d9b49d493189836bfac"
}
],
"success": true
}