Add Guests

Adds Guest users to kintone.
This does not affiliate Guest users with any Guest Spaces, and does not send any invitation emails.
To affiliate a Guest user with a Guest Space, follow up this API call with the Update Space Guests API .

MethodPOST
URLhttps://{subdomain}.kintone.com/k/v1/guests.json
AuthenticationPassword 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 Guest user data.
guests[].name String Yes The display name of the user.
Must be between 1 - 128 characters.
guests[].code String Yes The email address (log in name) of the Guest user.
guests[].password String Yes The log in password of the Guest user.
guests[].timezone String Yes The timezone of the Guest user.
guests[].locale String The language settings of the Guest user.- auto: Use web browser settings.
- en: English
- zh: Chinese
- ja: Japanese
If ignored, auto will be set.
guests[].image String The profile image of the Guest user.
Specify a fileKey of an uploaded file. fileKeys can be found from the response of the Upload File API .
If ignored, a default image will be set.
guests[].surNameReading String The Phonetic Surname settings of the Guest User. The maximum limit is 64 characters.
guests[].givenNameReading String The Phonetic Given Name settings of the Guest User. The maximum limit is 64 characters.
guests[].company String The Company name to display on the Guest User’s profile.
The maximum limit is 100 characters.
guests[].division String The Department name to display on the Guest User’s profile.
The maximum limit is 100 characters.
guests[].phone String The Phone number to display on the Guest User’s profile.
The maximum limit is 100 characters.
guests[].callto String The Skype Name of the Guest user.
The maximum limit is 256 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
25
26
27
28
29
30
31
32
33
34
35
36
var body = {
  'guests': [
    {
      'code': 'guest1@example.com',
      'password': 'password',
      'timezone': 'America/Los_Angeles',
      'locale': 'en',
      'image': '78a586f2-e73e-4a70-bec2-43976a60746e',
      'name': 'John Doe',
      'company': 'Company Name',
      'division': 'Sales',
      'phone': '999-456-7890',
      'callto': 'skypecallto'
    },
    {
      'code': 'guest2@example.com',
      'password': 'password',
      'timezone': 'America/Los_Angeles',
      'locale': 'en',
      'image': '78a586f2-e73e-4a70-bec2-43976a60746e',
      'name': 'Jane Roe',
      'company': 'Company Name',
      'division': 'Sales',
      'phone': '999-456-7890',
      'callto': 'skypecallto'
    }
  ]
};

kintone.api(kintone.api.url('/k/v1/guests', true), 'POST', 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
var body = {
  'guests': [
    {
      'code': 'guest1@example.com',
      'password': 'password',
      'timezone': 'America/Los_Angeles',
      'locale': 'en',
      'image': '78a586f2-e73e-4a70-bec2-43976a60746e',
      'name': 'John Doe',
      'company': 'Company Name',
      'division': 'Sales',
      'phone': '999-456-7890',
      'callto': 'skypecallto'
    },
    {
      'code': 'guest2@example.com',
      'password': 'password',
      'timezone': 'America/Los_Angeles',
      'locale': 'en',
      'image': '78a586f2-e73e-4a70-bec2-43976a60746e',
      'name': 'Jane Roe',
      'company': 'Company Name',
      'division': 'Sales',
      'phone': '999-456-7890',
      'callto': 'skypecallto'
    }
  ],
  // 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('POST', 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

  • Guest users will be added to the Kintone domain, but no invitation emails will be sent to the Guest users.
  • The on/off settings of the Space or Guest Space features do not affect this API.
  • The E-mail Notifications settings of the Guest user will be turned on by default.