Delete Guests

Deletes a Guest user from Kintone. If you would like to remove a user from a Guest Space without deleting their account, use the Update Guest Members API.

MethodDELETE
URLhttps://{subdomain}.kintone.com/k/v1/guests.json
Authentication Password Authentication, Session Authentication
Content-Typeapplication/json

Contents

Permissions

  • Only Kintone Administrators can use this API.

Request Parameters

Parameter Value Required Description
guests Array Yes A list of email addresses of Guest users.
Up to 100 Guests can be deleted.

Sample Request

JavaScript (using Kintone REST API Request)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
var body = {
  'guests': [
    'guest1@example.com',
    'guest2@example.com',
    'guest3@example.com'
  ]
};

kintone.api(kintone.api.url('/k/v1/guests.json', true), 'DELETE', body, function(resp) {
  // success
  console.log(resp);
}, function(error) {
  // error
  console.log(error);
});

XMLHttpRequest

 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
var body = {
  'guests': [
    'guest1@example.com',
    'guest2@example.com',
    'guest3@example.com'
  ],
  // CSRF TOKEN: used for all APIs that have an HTTP method of POST, PUT and DELETE on Kintone.
  '__REQUEST_TOKEN__': kintone.getRequestToken()
};

var url = 'https://{subdomain}.kintone.com/k/v1/guests.json';
var xhr = new XMLHttpRequest();
xhr.open('DELETE', url);
xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.onload = function() {
  if (xhr.status === 200) {
    // success
    console.log(JSON.parse(xhr.responseText));
  } else {
    // error
    console.log(JSON.parse(xhr.responseText));
  }
};
xhr.send(JSON.stringify(body));

Response Parameters

An empty JSON object will be returned.

Sample Response

1
{}

Limitations

  • The on/off settings of the Space or Guest Space features do not affect this API.
  • Note that his API is not for removing a user from a Guest Space - it is used to delete the Guest User account.