You can use this API request to remove a user or users from a group.
/services/v2/group/[groupId]/remove.json?users=[userId]
You can use the following parameters in your remove user(s) from a group request:
Specific: users
Other options: wrap
Permissions & Notes:
You must have the Edit users and groups permission under Site Administration Roles in the Advanced Editor.
The mandatory users parameter specifies, in a comma-separated format, the identifiers of the users to add to the group.
We added this request in version 1.6.3.
Sample Request
A PUT remove user(s) from a group request tohttps://apidocs.cloud.answerhub.com using a human-readable username and password (answerhub/test123) to remove a user (userId: 96,97,107) from a group (groupId: 31), would look like this:
curl
-u "answerhub:test123"
-H "Accept: application/json"
-H "Content-type: application/json"
-X PUT "https://apidocs.cloud.answerhub.com/services/v2/group/99/remove.json?users=96,97,107" -v
In the example above, we removed demo2 (user 96), demo3 (user 97), and guyS (user 107) from the Group called "Add Users to this Group" (group 99). The change can be seen in the admin console.
Expected Response
Successful Response:
- HTTP Status 204 - No Content