For AI agents: markdown of this page — /docs-content-en/entities/task-comments/get.md documentation index — /llms.txt
Get comment
GET /v1/tasks/:taskId/comments/:id
Returns a single task comment by its identifier. Works both for comments in the new card's chat and for entries in the old card's comment block.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ParametertaskId (path) |
Typenumber | Requiredyes | DescriptionTask ID. List: GET /v1/tasks |
Parameterid (path) |
Typenumber | Requiredyes | DescriptionComment ID. List: GET /v1/tasks/:taskId/comments, when adding — the response of POST /v1/tasks/:taskId/comments |
Examples
curl — personal key
curl "https://vibecode.bitrix24.com/v1/tasks/289/comments/36559" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl "https://vibecode.bitrix24.com/v1/tasks/289/comments/36559" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN"
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/tasks/289/comments/36559', {
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
})
const { success, data } = await res.json()
console.log(data.message)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/tasks/289/comments/36559', {
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const { success, data } = await res.json()
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | DescriptionAlways true on success |
Fielddata.id |
Typenumber | DescriptionComment identifier |
Fielddata.taskId |
Typenumber | DescriptionParent task ID |
Fielddata.authorId |
Typenumber | DescriptionAuthor. Profile: GET /v1/users/:authorId |
Fielddata.message |
Typestring | DescriptionComment text (supports BB-code) |
Fielddata.createdAt |
Typedatetime | DescriptionCreation date (UTC ISO 8601) |
Fielddata.attachments |
Typearray | DescriptionAttached files. The key is always present; with no files it is an empty list |
Fielddata.attachments[].fileId |
Typenumber | DescriptionFile identifier for downloading |
Fielddata.attachments[].downloadUrl |
Typestring | DescriptionPath to the file bytes, without the domain. Join it with the API base address. Operation — Download an attachment |
Fielddata.attachments[].name |
Typestring | DescriptionFile name, when Bitrix24 reported it |
Fielddata.attachments[].size |
Typenumber | DescriptionSize in bytes, when Bitrix24 reported it |
Response example
A comment with an attached file:
{
"success": true,
"data": {
"id": 9393,
"taskId": 3711,
"authorId": 29,
"message": "comment for test",
"createdAt": "2024-11-26T05:57:35.000Z",
"attachments": [
{
"fileId": 6687,
"downloadUrl": "/v1/tasks/3711/comments/9393/files/6687/download",
"name": "ava555.jpg",
"size": 405559
}
]
}
}
A comment with no files:
{
"success": true,
"data": {
"id": 36559,
"taskId": 289,
"authorId": 1,
"message": "Added a draft of the report to the comments — please take a look.",
"createdAt": "2026-05-13T12:30:58.000Z",
"attachments": []
}
}
Error response example
404 — comment not found:
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Comment not found"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeINVALID_PARAMS |
DescriptiontaskId or id is not a positive integer |
| HTTP404 | CodeNOT_FOUND |
DescriptionA comment with this id was found neither in the chat nor in the old card's comment block. The same response is returned when the task itself does not exist |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe API key does not have the task scope |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe API key has no configured tokens |
Full list of common API errors — Errors.
Known specifics
Two-stage lookup. On the new card, the API first searches for the comment among the last 200 messages of the task chat. If there is no match — for example, the comment is older than the last 200 messages or belongs to the old card — the request automatically falls back to the old read path. This is transparent to the client: the response format is the same.