[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Ftask-comments\u002Ffields":3,"docs-tabs-entities\u002Ftask-comments\u002Ffields":6},{"content":4,"lastmod":5},"\n## Comment fields\n\n`GET \u002Fv1\u002Ftasks\u002F:taskId\u002Fcomments\u002Ffields`\n\nReturns the task comment field schema: for each of the six fields — its type, a read-only flag, a label, and a description. Useful for code generation and AI-agent hints.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `taskId` (path) | number | yes | Task ID. The value is not validated — the schema is the same for any value, including a nonexistent task |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ftasks\u002F289\u002Fcomments\u002Ffields\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ftasks\u002F289\u002Fcomments\u002Ffields\" \\\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\u002Ftasks\u002F289\u002Fcomments\u002Ffields', {\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nconst { success, data } = await res.json()\nconsole.log('Comment fields:', Object.keys(data.fields))\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ftasks\u002F289\u002Fcomments\u002Ffields', {\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\n\nconst { success, data } = await res.json()\n```\n\n## Response fields\n\n`data.fields` is an object keyed by field name; each value is `{ type, readonly, label, description }`.\n\nThe `label` and `description` field captions are returned in English. Request headers do not switch the language.\n\n| Field | Type | RO | Description |\n|------|-----|----|---------|\n| `id` | number | yes | Comment identifier. May come back as `null` in the create response on the new card |\n| `taskId` | number | yes | Parent task identifier. Taken from the URL path |\n| `authorId` | number | yes | Comment author. Employee list: `GET \u002Fv1\u002Fusers` |\n| `message` | string | | Comment text, up to 65,535 characters. The only writable field, required on create. Supports BB-code |\n| `createdAt` | datetime | yes | Creation date and time, UTC ISO 8601 |\n| `attachments` | array | yes | Files attached to the comment. The key is always present; with no files it is an empty list. Each element: `fileId` (number), `name` and `size` (whenever Bitrix24 reported them), `downloadUrl` (root-relative path to the bytes) |\n\nThe RO fields (`readonly: true`) are set by the platform and are not accepted on create or update. Only `message` is writable.\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"fields\": {\n      \"id\": { \"type\": \"number\", \"readonly\": true, \"label\": \"ID\", \"description\": \"Comment identifier.\", \"nullable\": true },\n      \"taskId\": { \"type\": \"number\", \"readonly\": true, \"label\": \"Task ID\", \"description\": \"Identifier of the parent task (from the URL path).\" },\n      \"authorId\": { \"type\": \"number\", \"readonly\": true, \"label\": \"Author ID\", \"description\": \"Id of the user who posted the comment — an id from GET \u002Fv1\u002Fusers.\" },\n      \"message\": { \"type\": \"string\", \"readonly\": false, \"label\": \"Message\", \"description\": \"Comment text. Required on create.\" },\n      \"createdAt\": { \"type\": \"datetime\", \"readonly\": true, \"label\": \"Created at\", \"description\": \"Creation date, UTC ISO 8601.\" },\n      \"attachments\": { \"type\": \"array\", \"readonly\": true, \"label\": \"Attachments\", \"description\": \"Files attached to the comment. Always present; an empty array when there are none. Each element: fileId (number), name (string, when Bitrix24 provides it), size (number of bytes, when Bitrix24 provides it), downloadUrl (string, root-relative — join it with your account API base URL).\" }\n    }\n  }\n}\n```\n\n## Error response example\n\n403 — the key lacks the `task` scope:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"SCOPE_DENIED\",\n    \"message\": \"This endpoint requires 'task' scope\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 403 | `SCOPE_DENIED` | The API key does not have the `task` scope |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header was not provided |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [List comments](.\u002Flist.md)\n- [Create comment](.\u002Fcreate.md)\n- [Employees](\u002Fdocs\u002Fentities\u002Fusers)\n- [Tasks](\u002Fdocs\u002Fentities\u002Ftasks)\n","2026-09-15",{},1794739427539]