Add Records

Adds multiple records to an App.

MethodPOST
URLhttps://{subdomain}.kintone.com/k/v1/records.json
URL(guest space)https://{subdomain}.kintone.com/k/guest/{SpaceID}/v1/records.json
AuthenticationAPI Token Authentication , Password Authentication
Content-Typeapplication/json

Contents

Permissions

  • Permission to add records into the App is needed.
  • Permission to edit fields that are included in the request parameters are needed.

Request Parameters

PARAMETER VALUE REQUIRED DESCRIPTION
app Integer Yes The App ID.
records Array of Objects Yes Holds an array of record objects, that contains field codes and their values.

Fields that are not included in the objects are added with their default value.
Objects containing field codes that do not exist are ignored.
For field type specs, check the Field Types page.

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
25
26
27
28
29
var body = {
  'app': 1,
  'records': [
    {
      'Text': {
        'value': 'Sample001'
      },
      'Number': {
        'value': 1
      }
    },
    {
      'Text': {
        'value': 'Sample002'
      },
      'Number': {
        'value': 2
      }
    }
  ]
};

kintone.api(kintone.api.url('/k/v1/records', 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
21
22
23
24
$ curl -X POST 'https://{subdomain}.kintone.com/k/v1/records.json' \
-H 'X-Cybozu-API-Token: {APIToken}' \
-H 'Content-Type: application/json' \
-d '{
  "app": 1,
  "records": [
    {
      "Text": {
        "value": "Sample001"
      },
      "Number": {
        "value": 1
      }
    },
    {
      "Text": {
        "value": "Sample002"
      },
      "Number": {
        "value": 2
      }
    },
  ]
}'

Response Parameters

Parameter Type Description
ids Array of Strings The Record IDs of the created records.
revisions Array of Strings The revision numbers of the records.

Sample Response

1
2
3
4
{
  "ids": ["77", "78"],
  "revisions": ["1", "1"]
}

Limitations

To add values to the following fields, you must be the admin of the App:

  • Created by
  • Updated by
  • Created datetime
  • Updated datetime

If there are fields with the “Required field” option turned on, those fields must be included in the request.
Values cannot be added to the following fields.

  • The Field Mappings targets of the Lookup field
  • Status
  • Categories
  • Calculated
  • Assignee

For other limitations, please check the Limitations on this page .