Update Group's Users

Updates the list of Users that belong to a Group.

MethodPUT
URLhttps://{subdomain}.kintone.com/v1/group/users.json
Authentication Password Authentication, Session Authentication
Content-Typeapplication/json

Contents

Permissions

Only Administrators can use this API.

For more information on Administrators, refer to the following article:
Types of Administrators (External link)

Request Parameters

Parameter Value Required Description
code String Yes The Group's code.
Must be 128 characters or less.
Dynamic groups cannot be specified.
For more information on Dynamic groups, refer to the Managing groups (roles) section of the following link:
Configuring Groups (Roles) (External link)
users Array of Strings Yes A list of User Codes (log-in names) belonging to the Group.
Up to 1000 User Codes can be specified.
Users already belonging to the group will be removed if their User Codes are not included.
To remove all users belonging to the group, specify an empty array.

Sample Request

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
var body = {
  'codes': [
    {
      'code': 'Recruit2023',
      'users': [
        'Krispy', 'Morris'
      ]
    }
  ]
};

kintone.api(kintone.api.url('/v1/group/users.json', true), 'PUT', body, function(resp) {
  // success
  console.log(resp);
}, function(error) {
  // error
  console.log(error);
});

curl Sample

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
$ curl -X PUT \
  https://{subdomain}.kintone.com/v1/group/users.json \
  -H 'Content-Type: application/json' \
  -H 'X-Cybozu-Authorization: QWRtaW5pc3RyYXRvcjpjeWJvenU=' \
  -d '{
    'code': 'Recruit2023',
    'users': [
      'Krispy', 'Morris'
    ]
  }'

Response Parameters

An empty JSON object is returned.

Sample Response

1
{}

Limitations

  • Dynamic groups cannot be updated.
    To update the users belonging to the Groups, edit the conditions of the Dynamic groups.
    For more information on Dynamic groups, refer to the Managing groups (roles) section of the following article:
    Configuring Groups (Roles) (External link)
  • It is not recommended run this API while performing the following operations on the Users & System Administration page:
    • Updates to groups on the Groups (or Roles) page
      For more information on Groups (or Roles), refer to the following article:
      Managing Groups (or Roles) (External link)
    • Importing from a file