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
taskId (path) number yes Task ID. List: GET /v1/tasks
id (path) number yes Comment ID. List: GET /v1/tasks/:taskId/comments, when adding — the response of POST /v1/tasks/:taskId/comments

Examples

curl — personal key

Terminal
curl "https://vibecode.bitrix24.com/v1/tasks/289/comments/36559" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
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

javascript
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

javascript
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
success boolean Always true on success
data.id number Comment identifier
data.taskId number Parent task ID
data.authorId number Author. Profile: GET /v1/users/:authorId
data.message string Comment text (supports BB-code)
data.createdAt datetime Creation date (UTC ISO 8601)
data.attachments array Attached files. The key is always present; with no files it is an empty list
data.attachments[].fileId number File identifier for downloading
data.attachments[].downloadUrl string Path to the file bytes, without the domain. Join it with the API base address. Operation — Download an attachment
data.attachments[].name string File name, when Bitrix24 reported it
data.attachments[].size number Size in bytes, when Bitrix24 reported it

Response example

A comment with an attached file:

JSON
{
  "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:

JSON
{
  "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:

JSON
{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "Comment not found"
  }
}

Errors

HTTP Code Description
400 INVALID_PARAMS taskId or id is not a positive integer
404 NOT_FOUND A 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
403 SCOPE_DENIED The API key does not have the task scope
401 TOKEN_MISSING The 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.

See also