[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-posts\u002Fcomments\u002Fread":3,"docs-tabs-posts\u002Fcomments\u002Fread":6},{"content":4,"lastmod":5},"## Read user comments\n\n`GET \u002Fv1\u002Fposts\u002Fcomments`\n\nReturns an employee's comments on all Feed posts, from newest to oldest.\n\nThe method has no post filter: the post of each comment is given in the `postId` field.\n\n## Parameters\n\n| Parameter | Type | Required | Default | Description |\n|----------|-----|:-----:|-----------|----------|\n| `userId` (query) | number | no | the key's user | ID of the employee whose comments you need. List: [GET \u002Fv1\u002Fusers](\u002Fdocs\u002Fentities\u002Fusers\u002Flist). Applies only if the key's user is a Bitrix24 account administrator. If the key belongs to an employee without administrator rights, the parameter has no effect: that employee's own comments are returned, with no error |\n| `lastId` (query) | number | no | — | Comment ID in the feed — the `data.comments[].id` field. Returns the nearest comments older than it. `0` — start from the newest comment |\n| `firstId` (query) | number | no | — | Comment ID in the feed — the `data.comments[].id` field. Returns the nearest comments newer than it. `0` — start from the oldest comment. If both `firstId` and `lastId` are passed, only `firstId` applies |\n| `limit` (query) | number | no | `100` | How many comments to return, a positive integer. A value greater than 1000 is replaced with 1000 |\n\nOther query parameters are rejected with `400 INVALID_PARAMS`.\n\nPagination: to move toward older comments, request the next page with `lastId` equal to the smallest `id` on the current page; to move toward newer ones, use `firstId` equal to the largest. Within a page, comments are always sorted from newest to oldest, even with `firstId`: the largest `id` comes first. An empty `data.comments` array means there are no more comments in that direction.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fposts\u002Fcomments?limit=2\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fposts\u002Fcomments?limit=2\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\"\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fposts\u002Fcomments?limit=2', {\n  headers: { 'X-Api-Key': 'YOUR_API_KEY' },\n})\nconst result = await res.json()\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fposts\u002Fcomments?limit=2', {\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\nconst result = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|----------|\n| `success` | boolean | `true` on a successful response |\n| `data.comments` | array | The employee's comments, from newest to oldest. An empty array means there are no comments |\n| `data.comments[].id` | number | Comment ID in the feed. Accepted by the `firstId` and `lastId` cursors and by [DELETE \u002Fv1\u002Ffeed-comments\u002F:id](\u002Fdocs\u002Ffeed-comments\u002Fdelete) |\n| `data.comments[].commentId` | number | Post comment ID. Used together with `postId` in [DELETE \u002Fv1\u002Fposts\u002F:id\u002Fcomments\u002F:commentId](\u002Fdocs\u002Ffeed\u002Fcomments\u002Fdelete) |\n| `data.comments[].postId` | number | ID of the post the comment was left on. List of posts: [GET \u002Fv1\u002Fposts](\u002Fdocs\u002Ffeed\u002Fposts\u002Flist) |\n| `data.comments[].date` | string | Date and time of the comment in ISO 8601 format with a time zone offset |\n| `data.comments[].text` | string | Comment text. When an administrator requests another employee's comments via `userId`, an empty string is returned. The exception is system comments that Bitrix24 creates on its own, for example about a task created from a comment |\n| `data.comments[].attach` | array | IDs of the files attached to the comment, as numbers. These are the keys of `data.files` and link a file to its comment. If there are no files, an empty array `[]` is returned |\n| `data.files` | object or array | Files attached to the comments. Each key is a Drive file ID. If there are no files, an empty array `[]` is returned |\n| `data.files.\u003Cid>.id` | number | Drive file ID |\n| `data.files.\u003Cid>.name` | string | File name |\n| `data.files.\u003Cid>.type` | string | File kind: `image` — an image, `video` — a video, `file` — any other file |\n| `data.files.\u003Cid>.size` | number | File size in bytes |\n| `data.files.\u003Cid>.date` | string | Date and time the file was uploaded, in ISO 8601 format |\n| `data.files.\u003Cid>.authorId` | number | ID of the employee who uploaded the file. List: [GET \u002Fv1\u002Fusers](\u002Fdocs\u002Fentities\u002Fusers\u002Flist) |\n| `data.files.\u003Cid>.authorName` | string | Name of the employee who uploaded the file |\n| `data.files.\u003Cid>.image` | object or `false` | Dimensions in pixels — the `width` and `height` fields. For a video — the dimensions of the preview frame, or `0` if there is no preview. For files of the `file` kind — `false` |\n| `data.files.\u003Cid>.urlPreview` | string or `null` | Preview URL on the Bitrix24 account. `null` — there is no preview |\n| `data.files.\u003Cid>.urlShow` | string | URL for viewing the file on the Bitrix24 account. For files other than images, it matches `urlDownload` |\n| `data.files.\u003Cid>.urlDownload` | string | URL for downloading the file from the Bitrix24 account |\n\nFile URLs point to the Bitrix24 account, not to the Vibecode API. A response string that contains Bitrix24 authorization data — for example, an `auth` or `token` parameter in a URL — is replaced entirely with `[REDACTED]`: this happens both to a file URL and to comment text that contains such a link. This value is not a URL and cannot be opened.\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"comments\": [\n      {\n        \"id\": 6217,\n        \"commentId\": 75,\n        \"postId\": 327,\n        \"date\": \"2026-10-23T02:18:37+00:00\",\n        \"text\": \"Moved the call with the contractor to Friday.\",\n        \"attach\": []\n      },\n      {\n        \"id\": 6215,\n        \"commentId\": 73,\n        \"postId\": 327,\n        \"date\": \"2026-10-23T02:18:37+00:00\",\n        \"text\": \"Added the quarterly results to the agenda.\",\n        \"attach\": []\n      }\n    ],\n    \"files\": []\n  }\n}\n```\n\n## Error response example\n\n400 — `limit` is not a positive integer:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"INVALID_PARAMS\",\n    \"message\": \"limit must be a positive integer (cursor also accepts zero)\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|----------|\n| 400 | `INVALID_PARAMS` | `userId`, `firstId`, `lastId` or `limit` is not a positive integer. `firstId` and `lastId` also accept `0` |\n| 400 | `INVALID_PARAMS` | The request contains a parameter the method does not accept |\n| 403 | `BITRIX_ACCESS_DENIED` | Bitrix24 denied access |\n| 422 | `BITRIX_ERROR` | Bitrix24 rejected the request. The error text is in `error.message` |\n| 502 | `BITRIX_ERROR` | The Bitrix24 response does not have the expected shape: `Invalid comment response` |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |\n| 401 | `INVALID_API_KEY` | The key is not found or has been revoked |\n| 401 | `TOKEN_MISSING` | The key has no portal tokens. An OAuth application key requires the `Authorization: Bearer` header |\n| 403 | `SCOPE_DENIED` | The key does not have the `log` scope |\n| 429 | `RATE_LIMITED` | The Bitrix24 request rate limit was exceeded. Retry after the delay in the `Retry-After` header |\n| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 is unavailable |\n| 503 | `BITRIX_TIMEOUT` | Bitrix24 accepted the request but did not respond in time |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [User comments](\u002Fdocs\u002Fposts\u002Fcomments)\n- [Delete a feed comment](\u002Fdocs\u002Ffeed-comments\u002Fdelete)\n- [Delete a comment](\u002Fdocs\u002Ffeed\u002Fcomments\u002Fdelete)\n- [List posts](\u002Fdocs\u002Ffeed\u002Fposts\u002Flist)\n- [Feed](\u002Fdocs\u002Ffeed)\n- [Errors](\u002Fdocs\u002Ferrors)\n","2026-10-28",{},1795415496939]