Add All Users to Group

Prev Next
Post
/api/v1/groups.addAll

Add all workspace users to the private channel. You can do this if you are a member of the private channel or have admin permissions.

Changelog

Version Description
0.55.0 Added
Header parameters
X-Auth-Token
stringRequired

The authToken of the authenticated user.

ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired

The userId of the authenticated user.

ExamplerbAXPnMktTFbNpwtJ
Body parameters
Example
{
  "roomId": "ByehQjC44FwMeiLbX",
  "activeUsersOnly": true
}
object
roomId
string Required

Enter the group ID. Alternatively, you can enter the name using the roomName query parameter. You can find the IDs by using any of the following endpoints:

  • Get List of User Groups: This endpoint returns all private channels in the workspace, if you have the required permissions to view them.
  • Get Groups: This endpoint returns the private channels that you are a member of.
activeUsersOnly
boolean

Add only active users to the room.

Responses
200

OK

Success
{
  "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
}
Expand All
object
channel
object
_id
string
name
string
t
string
usernames
Array of string
string
msgs
integer
u
object
_id
string
username
string
ts
string
success
boolean
400

Bad Request

Example 1
{
  "success": false,
  "error": "The required \"roomId\" or \"roomName\" param provided does not match any group [error-room-not-found]",
  "errorType": "error-room-not-found"
}
object
success
boolean
error
string
errorType
string
401

Unauthorized

Authorization Error
{
  "status": "error",
  "message": "You must be logged in to do this."
}
object
status
string
message
string