API reference
Task comments
Comments on a task, including the lines Klantly writes itself.
Endpoints
List comments on a task
GET
/api/v1/tasks/{task}/comments
The comments on a task, oldest first, including the lines Klantly wrote itself (is_system).
- Scope
-
tasks.read— Read tasks, boards and comments - Required feature
tasks
Path parameters
| Name | Type | Description |
|---|---|---|
task required |
string (uuid) | The id (UUID) of the task. |
Query parameters
| Name | Type | Description |
|---|---|---|
limit
|
integer | Number of results per page. from 1 to 100 · default: 50 |
cursor
|
string | The next_cursor or prev_cursor from meta of the previous response. |
Example request
curl "https://app.klantly.com/api/v1/tasks/9d3f6c1e-4b2a-4c8e-9f1a-2b3c4d5e6f70/comments" \
-H "Authorization: Bearer $KLANTLY_API_KEY"$client = new \GuzzleHttp\Client([
'base_uri' => 'https://app.klantly.com/api/v1/',
'headers' => ['Authorization' => 'Bearer ' . getenv('KLANTLY_API_KEY')],
]);
$response = $client->request('GET', 'tasks/9d3f6c1e-4b2a-4c8e-9f1a-2b3c4d5e6f70/comments');
$data = json_decode((string) $response->getBody(), true)['data'];const response = await fetch('https://app.klantly.com/api/v1/tasks/9d3f6c1e-4b2a-4c8e-9f1a-2b3c4d5e6f70/comments', {
headers: {
Authorization: `Bearer ${process.env.KLANTLY_API_KEY}`,
},
});
const { data } = await response.json();import os
import requests
response = requests.get(
"https://app.klantly.com/api/v1/tasks/9d3f6c1e-4b2a-4c8e-9f1a-2b3c4d5e6f70/comments",
headers={
"Authorization": f"Bearer {os.environ['KLANTLY_API_KEY']}",
},
)
data = response.json()["data"]Response 200
The response is a list with cursor pagination: data contains the objects, meta the pagination.
{
"data": [
{
"object": "task_comment",
"id": "9d3f8449-afe1-4a6e-9dbc-c1dfe0f1a2ba",
"task_id": "9d3f7fc5-6bad-4c2a-9f7e-8d9bacbdced6",
"body": "Klant belt morgen terug.",
"is_system": false,
"author": {
"object": "user",
"id": "usr_0k3j9x21m4zq8p",
"name": "Sanne Bakker"
},
"created_at": "2026-09-14T10:15:00Z"
}
],
"meta": {
"limit": 50,
"next_cursor": "eyJpZCI6IjlkM2Y2YzFlIn0",
"prev_cursor": null
}
}Possible errors
-
403
insufficient_scope— This API key has no access to this action. -
404
not_found— Not found. -
422
validation_failed— The input is invalid.
Post a comment
POST
/api/v1/tasks/{task}/comments
Posts a comment on the task. The assigned user and the creator get a notification. A comment posted through the API has no author.
- Scope
-
tasks.write— Create, update, move and complete tasks, and post comments - Required feature
tasks
Send an Idempotency-Key and a retry after a timeout will never create a duplicate record.
Path parameters
| Name | Type | Description |
|---|---|---|
task required |
string (uuid) | The id (UUID) of the task. |
Body (JSON)
| Field | Type | Description |
|---|---|---|
body
required
|
string | The text of the comment. at most 5000 characters |
Example request
curl -X POST "https://app.klantly.com/api/v1/tasks/9d3f6c1e-4b2a-4c8e-9f1a-2b3c4d5e6f70/comments" \
-H "Authorization: Bearer $KLANTLY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 6f1c2d3e-4a5b-4c6d-8e7f-9a0b1c2d3e4f" \
-d '{
"body": "Klant belt morgen terug."
}'$client = new \GuzzleHttp\Client([
'base_uri' => 'https://app.klantly.com/api/v1/',
'headers' => ['Authorization' => 'Bearer ' . getenv('KLANTLY_API_KEY')],
]);
$response = $client->request('POST', 'tasks/9d3f6c1e-4b2a-4c8e-9f1a-2b3c4d5e6f70/comments', [
'headers' => [
'Idempotency-Key' => '6f1c2d3e-4a5b-4c6d-8e7f-9a0b1c2d3e4f',
],
'json' => [
'body' => 'Klant belt morgen terug.',
],
]);
$data = json_decode((string) $response->getBody(), true)['data'];const response = await fetch('https://app.klantly.com/api/v1/tasks/9d3f6c1e-4b2a-4c8e-9f1a-2b3c4d5e6f70/comments', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.KLANTLY_API_KEY}`,
'Content-Type': 'application/json',
'Idempotency-Key': '6f1c2d3e-4a5b-4c6d-8e7f-9a0b1c2d3e4f',
},
body: JSON.stringify({
"body": "Klant belt morgen terug."
}),
});
const { data } = await response.json();import os
import requests
response = requests.post(
"https://app.klantly.com/api/v1/tasks/9d3f6c1e-4b2a-4c8e-9f1a-2b3c4d5e6f70/comments",
headers={
"Authorization": f"Bearer {os.environ['KLANTLY_API_KEY']}",
"Idempotency-Key": "6f1c2d3e-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
},
json={
"body": "Klant belt morgen terug."
},
)
data = response.json()["data"]Response 201
{
"data": {
"object": "task_comment",
"id": "9d3f8449-afe1-4a6e-9dbc-c1dfe0f1a2ba",
"task_id": "9d3f7fc5-6bad-4c2a-9f7e-8d9bacbdced6",
"body": "Klant belt morgen terug.",
"is_system": false,
"author": {
"object": "user",
"id": "usr_0k3j9x21m4zq8p",
"name": "Sanne Bakker"
},
"created_at": "2026-09-14T10:15:00Z"
}
}Possible errors
-
403
insufficient_scope— This API key has no access to this action. -
422
validation_failed— The input is invalid. -
422
unknown_field— The input contains an unknown field. -
415
unsupported_media_type— This format is not supported. -
413
payload_too_large— The request body is too large. -
404
not_found— Not found. -
422
idempotency_key_reused— This Idempotency-Key was already used for a different request. -
409
idempotency_in_progress— A request with this Idempotency-Key is still in progress.
The object
All fields are always present; a field without a value is null.
| Field | Type | Description |
|---|---|---|
object |
string | Always "task_comment". |
id |
string (uuid) | Unique id (UUID). |
task_id |
string (uuid) | The task. |
body |
string | The text of the comment. |
is_system |
boolean | A line Klantly wrote itself, such as "moved to column In progress". |
author |
object | Who wrote the comment, or null (a system line or a comment through the API). can be empty (null) |
author.object |
string | Always "user". |
author.id |
string | Id of the user. |
author.name |
string | Name of the user. |
created_at |
string (date-time) | Posted at (UTC). |