Add All Users to Group

Adds all of the users of the Rocket.Chat workspace to the group/channel.

HTTP MethodURLRequires Auth

POST

/api/v1/groups.addAll

Body Parameters

KeyExample ValueDescription

roomId*

ByehQjC44FwMeiLbX

The channel 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" \
     http://localhost:3000/api/v1/channels.addAll \
     -d '{ 
          "roomId": "ByehQjC44FwMeiLbX" }'

Example Response

{
   "channel": {
      "_id": "ByehQjC44FwMeiLbX",
      "name": "groupname",
      "t": "p",
      "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

Last updated

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