Skip to main content
Version: .1.1.3

Comments API

The Comments API manages discussion threads on tasks and projects. Comments use a polymorphic attachment pattern where each comment targets either a task or a project.

Data model

FieldTypeDescription
idstringUnique identifier (e.g. cmt_01)
targetTypestringEither task or project
targetIdstringID of the task or project being commented on
authorstringUsername of the comment author
bodystringComment text content
createdAtstringISO 8601 creation timestamp
updatedAtstringISO 8601 last-update timestamp

Endpoints

List comments

GET /api/comments

Query parameters:

ParameterTypeDescription
targetTypestringFilter by target type (task or project)
targetIdstringFilter by specific target ID
authorstringFilter by comment author

All filters are optional and can be combined.

Response: 200 OK

{
"data": [
{
"id": "cmt_01",
"targetType": "task",
"targetId": "task_02",
"author": "alice",
"body": "The hamburger menu animation feels sluggish on older devices.",
"createdAt": "2026-01-12T09:15:00Z",
"updatedAt": "2026-01-12T09:15:00Z"
}
],
"count": 1
}

Get comment

GET /api/comments/:id

Response: 200 OK with the full comment object.

Error: 404 Not Found if the comment does not exist.

Create comment

POST /api/comments

Request body:

{
"targetType": "task",
"targetId": "task_02",
"author": "alice",
"body": "This looks good to me!"
}
FieldRequiredDefault
targetTypeyes
targetIdyes
authoryes
bodyno""

Response: 201 Created with the new comment including auto-generated id, createdAt, and updatedAt fields.

Update comment (partial)

PATCH /api/comments/:id

Only the provided fields are updated. The id, targetType, targetId, author, and createdAt fields are immutable and will be preserved even if included in the request.

{
"body": "Updated comment text"
}

Response: 200 OK with the updated comment.

Error: 404 Not Found if the comment does not exist.

Delete comment

DELETE /api/comments/:id

Response: 200 OK

{
"data": {
"id": "cmt_01",
"deleted": true
}
}

Error: 404 Not Found if the comment does not exist.