Updates the Guest Members of a Space.
Method | PUT |
URL(guest space) | https://{subdomain}.kintone.com/k/guest/{SpaceID}/v1/space/guests.json |
Authentication |
Password Authentication |
Content-Type | application/json |
Permissions
- Only the Guest Space Administrator can use this API.
Request Parameters
Parameter |
Value |
Required |
Description |
id |
Integer or String |
Yes |
The Guest Space ID. |
guests |
Array |
Yes |
A list of email addresses of Guest users.
Guest users must first be added as a Guest user of Kintone before they can be affiliated with Spaces. To do this, use the
Add Guests API. Users who are not Guest users, or are inactive/deleted users cannot be added to the list. |
Sample Request
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
var body = {
'id': 1001,
'guests': [
'guest1@example.com',
'guest2@example.com',
'guest3@example.com'
]
};
kintone.api(kintone.api.url('/k/guest/{guestspaceId}/v1/space/guests', false), 'PUT', 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
|
var body = {
'id': 1001,
'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/guest/{guestspaceId}/v1/space/guests.json';
var xhr = new XMLHttpRequest();
xhr.open('PUT', 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
Limitations
- If the Space or Guest Space feature is turned off, an error will be returned.
- Guest users must first be added as a Guest user of Kintone before they can be affiliated with Spaces. To do this, use the
Add Guests API.