Add Groups

Adds Groups to a Kintone environment.

MethodPOST
URLhttps://{subdomain}.kintone.com/v1/groups.json
AuthenticationPassword Authentication
Content-Typeapplication/json

Contents

Permissions

Only Administrators (External link) can use this API.

Request Parameters

Parameter Value Required Description
groups Array of Objects Yes An array of groups objects, containing data of Groups to be added.
Up to 100 groups objects can be specified.
groups[].code String Yes The Group Code.
The maximum limit is 128 characters.
Values consisting of only whitespaces or null are not allowed.
groups[].name String Yes The name of the Group.
The maximum limit is 128 characters.
groups[].type String Yes The type of the Group.
Either “static” or “dynamic” must be specified.
groups[].description String Optional The description of the Group.
The maximum limit is 1000 characters.

Sample Request

JavaScript (using Kintone REST API Request)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
var body = {
  'groups': [
    {
      'code': '1',
      'name': 'Officer',
      'type': 'dynamic',
      'description': ''
    },
    {
      'code': 'general_manager',
      'name': 'General Manager',
      'type': 'static',
      'description': 'A group with all the general managers.'
    }
  ]
};

kintone.api(kintone.api.url('/v1/groups', true), 'POST', 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
11
12
13
14
15
16
17
18
19
20
$ curl -X POST \
  https://{subdomain}.kintone.com/v1/groups.json \
  -H 'Content-Type: application/json' \
  -H 'X-Cybozu-Authorization: a2ludG9uZTpkZXZlbG9wZXI=' \
  -d '{"groups":
  [
    {
      "code": "1",
      "name": "Officer",
      "type": "dynamic",
      "description": ""
    },
    {
      "code": "general_manager",
      "name": "General Manager",
      "type": "static",
      "description": "A group with all the general managers."
    }
  ]
}'

Response Parameters

An empty JSON object will be returned.

Sample Response

1
{}