Add a Task Comment

POST/api/tasks/{id}/comments

Adds a comment to a task, authored by the token's staff member. Requires the Tasks "post" permission. Send an Idempotency-Key header to make retries safe.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number Task unique ID (URL segment).
content String Mandatory comment text.
curl -X POST "https://yoursite.com/api/tasks/123/comments" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "content": "..." }'

Success-Response:

HTTP/1.1 200 OK
{ "status": true, "message": "Comment added successfully", "comment_id": 42 }

Validation:

HTTP/1.1 400 Bad Request
{ "status": false, "message": "Content is required" }
MethodPOST
Path/api/tasks/{id}/comments
GroupTasks
Sincev3.0.3
Defined inmodules/api/controllers/Tasks.php