Add Rooms to a Team

HTTP MethodURLRequires Auth



Permission required: add-team-channel

Body Parameters

KeyExample ValueDescription

teamId* or teamName*

ByehQjC44FwMeiLbX or team1

The team ID or the team name. You must enter either one of the parameters.



The IDs of the rooms to be added to the team.

Example Call

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"]}'

Example Response

  "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

Last updated

Rocket.Chat versions receive support for six months after release.