Skip to content

Comments API

Per-todo threaded comments. All endpoints require authentication and team membership. Comment permissions are checked against the team's permission configuration.


GET /api/teams/:teamId/todos/:todoId/comments

List all comments on a todo, ordered by createdAt ascending (oldest first).

Auth required: Yes — team member with view_todos for the set

Path parameters:

ParameterDescription
teamIdThe team UUID.
todoIdThe UUID of the todo whose comments to fetch.

Response:

json
{
  "comments": [
    {
      "id": "uuid",
      "userId": "user-uuid",
      "username": "alice",
      "displayName": "Alice Chen",
      "avatarUrl": "https://id.example.com/avatars/alice.png",
      "body": "Looks good to me!",
      "createdAt": "2026-03-17T14:30:00.000Z"
    },
    {
      "id": "uuid-2",
      "userId": "user-uuid-2",
      "username": "bob",
      "displayName": "Bob Smith",
      "avatarUrl": "",
      "body": "I'll handle the deployment.",
      "createdAt": "2026-03-17T15:00:00.000Z"
    }
  ]
}
FieldTypeDescription
comments[].idstring (UUID)Unique comment identifier.
comments[].userIdstring (UUID)ID of the comment author.
comments[].usernamestringAuthor's Prism username (login name).
comments[].displayNamestringAuthor's display name. May be empty.
comments[].avatarUrlstringURL to avatar image. May be empty. Fetched directly from Prism's CDN by the browser.
comments[].bodystringComment text content.
comments[].createdAtstring (ISO 8601)Timestamp of when the comment was posted.

Error responses:

StatuserrorCause
401"Unauthorized"Not logged in.
403"Forbidden"Not a member, or view_todos is revoked for this set.
404"Todo not found"No todo with that ID in this team.

POST /api/teams/:teamId/todos/:todoId/comments

Add a new comment to a todo.

Auth required: Yes — comment permission

Request body:

json
{ "body": "Looks good to me!" }
FieldTypeRequiredDescription
bodystringYesComment text. Cannot be empty.

Response (201):

json
{
  "comment": {
    "id": "new-uuid",
    "userId": "user-uuid",
    "username": "alice",
    "displayName": "Alice Chen",
    "avatarUrl": "https://id.example.com/avatars/alice.png",
    "body": "Looks good to me!",
    "createdAt": "2026-03-17T14:30:00.000Z"
  }
}

Error responses:

StatuserrorCause
400"Body is required"body is missing or empty.
403"Forbidden"Lacks comment permission.
404"Todo not found"No todo with that ID in this team.

DELETE /api/teams/:teamId/todos/:todoId/comments/:commentId

Delete a comment. You can always delete your own comments; deleting others' requires the delete_any_comment permission.

Auth required: Yes — delete_own_comments (own comment) or delete_any_comment (others')

Path parameters:

ParameterDescription
commentIdUUID of the comment to delete.

Response:

json
{ "ok": true }

Error responses:

StatuserrorCause
403"Forbidden"Comment belongs to another user and you lack delete_any_comment.
404"Comment not found"No comment with that ID on this todo.