Add Record

Adds 1 record to an App.

MethodPOST
URLhttps://{subdomain}.kintone.com/k/v1/record.json
URL(guest space)https://{subdomain}.kintone.com/k/guest/{SpaceID}/v1/record.json
Authentication Password Authentication, API Token Authentication, Session 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.
record Object Optional Field codes and values are specified in this object.
If ignored, the record will be added with default field values.
If field codes that don't exist are specified, these will be ignored.
For more information on field types, refer to the following article:
Field Types

Sample Request

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
var body = {
  'app': 1,
  'record': {
    'Text': {
      'value': 'Sample'
    },
    'Number': {
      'value': 1
    }
  }
};

kintone.api(kintone.api.url('/k/v1/record.json', 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
curl -X POST 'https://{subdomain}.kintone.com/k/v1/record.json' \
  -H 'X-Cybozu-API-Token: {APIToken}' \
  -H 'Content-Type: application/json' \
  -d '{
    "app": 1,
    "record": {
      "text": {
        "value": "Sample"
      },
      "Number": {
        "value": 1
      }
    }
  }'

Response Parameters

Parameter Type Description
id String The Record ID of the created Record.
revision String The revision number of the Record.

Sample Response

1
2
3
4
{
  "id": "1",
  "revision": "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 section in the following article:
Kintone REST API Overview

Add Multiple Records

To add data of multiple records, refer to the following article:
Add Records