#Task comments

Entity: taskComment | Scope: tasks | Base path: /v1/tasks/:taskId/comments

Nested under tasks — all operations require taskId in the URL path. Field names are automatically converted to camelCase.

#Operations

Method Path Description Bitrix24 Method
GET /v1/tasks/:taskId/comments List comments for a task task.commentitem.getlist
GET /v1/tasks/:taskId/comments/:id Get comment by ID task.commentitem.get
POST /v1/tasks/:taskId/comments Create comment task.commentitem.add
PATCH /v1/tasks/:taskId/comments/:id Update comment task.commentitem.update
DELETE /v1/tasks/:taskId/comments/:id Delete comment task.commentitem.delete
POST /v1/tasks/:taskId/comments/batch Batch create/update/delete Native batch

#Fields

API Name Bitrix24 Name Type Readonly Description
id ID number yes Comment ID
taskId TASK_ID number Task ID (set via URL path)
authorId AUTHOR_ID number yes Author user ID
message POST_MESSAGE string Comment text
createdAt POST_DATE datetime yes Created date

#Examples

#List comments

Terminal
curl -X GET '/v1/tasks/311/comments' \
  -H 'X-Api-Key: YOUR_KEY'

#Get comment by ID

Terminal
curl -X GET '/v1/tasks/311/comments/123' \
  -H 'X-Api-Key: YOUR_KEY'

#Create comment

Terminal
curl -X POST '/v1/tasks/311/comments' \
  -H 'X-Api-Key: YOUR_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"message":"New comment text"}'

#Update comment

Terminal
curl -X PATCH '/v1/tasks/311/comments/123' \
  -H 'X-Api-Key: YOUR_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"message":"Updated comment text"}'

#Delete comment

Terminal
curl -X DELETE '/v1/tasks/311/comments/123' \
  -H 'X-Api-Key: YOUR_KEY'

#Batch create

Terminal
curl -X POST '/v1/tasks/311/comments/batch' \
  -H 'X-Api-Key: YOUR_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"action":"create","items":[{"message":"First"},{"message":"Second"}]}'

#Batch delete

Terminal
curl -X POST '/v1/tasks/311/comments/batch' \
  -H 'X-Api-Key: YOUR_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"action":"delete","ids":[123,456]}'