Add User(s) to a Group

You can use this API request to add a user or users to a group.


You can use the following parameters in your add user(s) to 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 add user(s) to a group request to using a human-readable username and password (answerhub/test123) to add users (userId: 96, 97, and 107) to a group (groupId: 99), would look like this:

-u "answerhub:test123" 
-H "Accept: application/json" 
-H "Content-type: application/json" 
-X PUT ",97, 107" -v

In the example above, we added demo2 (user 96), demo3 (user 97), and guyS (user 107) to the Group called "Add Users to this Group" (group 99). The change can be seen in the admin console.

Sample Response

Successful Response:

  • HTTP Status 204 - No Content

Error Response:
If you don't have the correct permissions, you will get this response.

  • HTTP Status 401 Unauthorized
    "errors": {
        "message": "You don't have permission to do this action.
Please login as another user"

Error Response:
If the users are already in the Group, then you will get this response.

  • HTTP Status 401 Unauthorized
        <title>Apache Tomcat/7.0.81 - Error report</title>
            <!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;} {color : black;}HR {color : #525D76;}-->
        <h1>HTTP Status 401 - Bad credentials</h1>
        <HR size="1" noshade="noshade">
            <b>type</b> Status report
            <u>Bad credentials</u>
            <u>This request requires HTTP authentication.</u>
        <HR size="1" noshade="noshade">
        <h3>Apache Tomcat/7.0.81</h3>
Click Try It! to start a request and see the response here!