Add All Users to a Channel

Adds all of the users of the Rocket.Chat server to the channel.

HTTP MethodURLRequires Auth

POST

/api/v1/channels.addAll

Body Parameters

KeyExample ValueDescription

roomId*

ByehQjC44FwMeiLbX

The channel's id

activeUsersOnly

true

Add active users only. By default, the value is false.

Example Call

curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
     -H "X-User-Id: aobEdbYhXfu5hkeqG" \
     -H "Content-type: application/json" \
     https://localhost:3000/api/v1/channels.addAll \
     -d '{ "roomId": "ByehQjC44FwMeiLbX" }'

Example Response

{
   "channel": {
      "_id": "ByehQjC44FwMeiLbX",
      "name": "channelname",
      "t": "c",
      "usernames": [
         "example",
         "rocket.cat"
      ],
      "msgs": 0,
      "u": {
         "_id": "aobEdbYhXfu5hkeqG",
         "username": "example"
      },
      "ts": "2016-05-30T13:42:25.304Z"
   },
   "success": true
}

Change Log

VersionDescription

0.55.0

Added activeUsersOnly param

0.48.0

Renamed to channels.addAll from channel.addAll

Last updated

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