Add Thread

Adds a Thread in a Space.

caution
Attention

The Enable multiple threads option must be enabled in the space settings in order to use this API.

MethodPOST
URLhttps://{subdomain}.kintone.com/k/v1/space/thread.json
URL(guest space)https://{subdomain}.kintone.com/k/guest/{SpaceID}/v1/space/thread.json
Authentication Password Authentication, Session Authentication
Content-Typeapplication/json

Contents

Permissions

For Private Spaces/Guest Spaces, the user must be a member of the Space.

Request Parameters

Parameter Value Required Description
space Integer or String Yes The Space ID.
name String Yes The new name of the Thread.
Must be between 1 - 128 characters.

Sample Request

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
var body = {
  'space': 1,
  'name': 'Thread Name'
};

kintone.api(kintone.api.url('/k/v1/space/thread.json', 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
var body = {
  'space': 1,
  'name': 'Thread Name',
  // 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/space/thread.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

Parameter Type Description
id String The Space ID of the created Space.

Sample Response

1
2
3
{
  "id": "1"
}

Limitations

  • If the Space or Guest Space feature is turned off, an error will be returned.
  • This API can only be used on Spaces with multiple threads.
  • The notifications are notified to space members as "All" notification.