Reference
Fuselage
Channel Add All
Adds all of the users of the Rocket.Chat server to the channel.
URL
Requires Auth
HTTP Method
/api/v1/channels.addAll
yes
POST

Payload

Argument
Example
Required
Description
roomId
ByehQjC44FwMeiLbX
Required
The channel's id
activeUsersOnly
true
Optional Default: false
Add active users only

Example Call

1
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
2
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
3
-H "Content-type: application/json" \
4
http://localhost:3000/api/v1/channels.addAll \
5
-d '{ "roomId": "ByehQjC44FwMeiLbX" }'
Copied!

Example Result

1
{
2
"channel": {
3
"_id": "ByehQjC44FwMeiLbX",
4
"name": "channelname",
5
"t": "c",
6
"usernames": [
7
"example",
8
"rocket.cat"
9
],
10
"msgs": 0,
11
"u": {
12
"_id": "aobEdbYhXfu5hkeqG",
13
"username": "example"
14
},
15
"ts": "2016-05-30T13:42:25.304Z"
16
},
17
"success": true
18
}
Copied!

Change Log

Version
Description
0.55.0
Added activeUsersOnly param
0.48.0
Renamed to channels.addAll from channel.addAll
Last modified 8mo ago
Export as PDF
Copy link
Edit on GitHub