Update Assignees

Updates the Assignees of a Record status, that was set with the Process Management feature (External link) .

MethodPUT
URLhttps://{subdomain}.kintone.com/k/v1/record/assignees.json
URL(guest space)https://{subdomain}.kintone.com/k/guest/{SpaceID}/v1/record/assignees.json
Authentication Password Authentication, API Token Authentication, Session Authentication
Content-Typeapplication/json

Contents

Permissions

The user or API Token must both have permission to manage the App and view records.

Request Parameters

PARAMETER VALUE REQUIRED DESCRIPTION
app Integer or String Yes The App ID.
id Integer or String Yes The Record ID.
assignees Array Yes The user code(s) (log in names) of the Assignee(s). If empty, no users will be assigned. The maximum number of Assignees is 100.
revision Integer or String Optional The revision number of the record before updating the Assignees. If the specified revision is not the latest revision, the request will result in an error. The revision will not be checked if this parameter is ignored, or -1 is specified.

Sample Request

JavaScript (using Kintone REST API Request)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
var body = {
  'app': 1,
  'id': 4,
  'assignees': ['Krispy']
};

kintone.api(kintone.api.url('/k/v1/record/assignees.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
curl -X PUT 'https://{subdomain}.kintone.com/k/v1/record/assignees.json' \
-H 'X-Cybozu-API-Token: L08xCvTh7A1EVm3rZimF98R8VLP3k4lMlzELqyCx' \
-H 'Content-Type: application/json' \
-d '{
  "app": 1,
  "id": 4,
  "assignees": ["Krispy"]
}'

Response Parameters

PARAMETER VALUE DESCRIPTION
revision String The revision number of the record after updating the Assignees.

Sample Response

1
2
3
{
  "revision": "4"
}

Limitations

  • This API can only be used with Apps that have the Process Management feature enabled.
  • The request will result in an error if a user without permission is assigned as the Assignee.
  • The error will return if more than 2 Assignees are assigned to a record that only allows one Assignee.

Related Article