Update Thread

Updates a Thread of a Space.

MethodPUT
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

  • Only Space Administrators or the creator of the thread can use this API.

Request Parameters

Parameter Value Required Description
id Integer or String Yes The Thread ID.
The Thread ID can be found in the URL of the Thread.
A Space with the URL of https://{domainname}.kintone.com/k/#/space/111/thread/222 has a Space ID of 111 and a Thread ID of 222.
name String The new name of the Thread.
Must be between 1 - 128 characters.
The name will not be updated if this parameter is ignored.
The Thread name of single threaded Spaces cannot be updated.
body String The contents of the Thread body.
Write the contents as an HTML string, within 65535 characters
HTML tags that cannot be used will be automatically removed.
HTML can be used to attach Apps, files and Emoji.
The usage of the @ mark to mention a user will not notify that user.

Sample Request

JavaScript (using Kintone REST API Request)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
var body = {
  'id': 1001,
  'name': 'Thread Name',
  'body': '<b>Thread Body</b>'
};

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

1
{}

Limitations

  • If the Space or Guest Space feature is turned off, an error will be returned.