Productmind API

Comments are the discussions on your records, such as features, feature requests, tasks, bug reports, sessions and knowledge base documents. List a record's comments, add a comment or a reply, attach it to a passage of text, and edit, delete or resolve it. A comment that mentions a teammate notifies them.


List comments on an entity

GET
https://api.productmind.ai
/workspaces/{workspaceId}/comments

Returns comments scoped to a parent entity, ordered chronologically. Supports threading via parentCommentId, lexical anchoring via anchor, and resolution via resolvedAt. Pass entity=session and entityId=<sessionId> to read the inline feedback left on a session description during the plan-approval phase.

List comments on an entity › path Parameters

workspaceId
​string · required

Workspace UUID

List comments on an entity › query Parameters

entity
​string · enum · required

Parent entity type

Enum values:
feature
task
feature_request
bug_report
session
customer_research
release
knowledge_base_document
entityId
​string · required

Parent entity UUID

page
​number

Page number (1-indexed, default 1)

limit
​number

Items per page (default 50)

sortBy
​string · enum

Field to sort by

Enum values:
createdAt
updatedAt
sortOrder
​string · enum

Sort direction (default desc)

Enum values:
asc
desc
search
​string

Full-text search across searchable fields

List comments on an entity › Responses

200

List of comments

​CommentDTO[] · required
​object
​object

Add a comment on any commentable entity

POST
https://api.productmind.ai
/workspaces/{workspaceId}/comments

Polymorphic comment creation. Pass entity (one of the values the request schema lists) and entityId to attach the comment to its parent. Use kind=comment (default) for human discussion, kind=agent_action/agent_response for AI-driven flows. Pass anchor for an inline lexical-range highlight, and parentCommentId to reply within a thread. [@Name](mention://uuid) tokens in content notify the people they name, but only people who can view the entity: active members of the workspace whose role can read comments and the entity, and, on a private feature, who are on its access list. A mention of anyone else is saved as plain @Name text and notifies nobody; the comment is still added.

Add a comment on any commentable entity › path Parameters

workspaceId
​string · required

Workspace UUID

Add a comment on any commentable entity › Request Body

entity
​string · enum · required
Enum values:
feature
task
feature_request
bug_report
session
customer_research
release
knowledge_base_document
entityId
​string · minLength: 1 · required
content
​string · minLength: 1 · required
kind
​string · enum

Omit for a plain comment. A coding agent replying to a comment passes agent_response. agent_action and system are written by Productmind itself and refused here.

Enum values:
comment
agent_action
agent_response
system
​CommentAnchor
parentCommentId
​string
codeAccess
​boolean

App only - omit. On a comment that asks PM (@pm) on a feature or component specification: true has a read-only coding agent answer instead, from the feature's code, as a coding run.

Add a comment on any commentable entity › Responses

Comment added

​CommentDTO · required

Delete a comment

DELETE
https://api.productmind.ai
/workspaces/{workspaceId}/comments/{commentId}

Remove a comment. Deletes any reply subtree via the self-FK ON DELETE CASCADE.

Delete a comment › path Parameters

workspaceId
​string · required

Workspace UUID

commentId
​string · required

Comment UUID

Delete a comment › Responses

200

Comment deleted

No data returned

Edit a comment

PATCH
https://api.productmind.ai
/workspaces/{workspaceId}/comments/{commentId}

Edit your own comment's content or anchor. Re-extracts mentions and notifies the newly mentioned people who can view the entity. A mention of anyone else, including one kept from the previous text, is saved as plain @Name text and notifies nobody.

Edit a comment › path Parameters

workspaceId
​string · required

Workspace UUID

commentId
​string · required

Comment UUID

Edit a comment › Request Body

content
​string · minLength: 1
​

Edit a comment › Responses

200

Updated comment

​CommentDTO · required

Edit the passage a comment thread highlights

POST
https://api.productmind.ai
/workspaces/{workspaceId}/comments/{commentId}/agent-turn/edit

Change the highlighted passage of the comment thread you are answering, directly: the change is made at once in the live document, in every open editor, and the person who asked can undo it from your reply. Only the top-level blocks the thread's highlight touches can change (the turn input shows them as markdown under "The highlighted blocks"): send edits (exact find-and-replace on those blocks' text) or, to rewrite all of them, content. Taken only from the thread you were asked to answer, while you answer it, on a highlighted passage (a general comment takes a suggestion instead), and only when the person who asked may edit the document. Refused while a new draft of a Marketing document is being written.

Edit the passage a comment thread highlights › path Parameters

workspaceId
​string · required

Workspace UUID

commentId
​string · required

The id of the comment thread you are answering, exactly as your turn input names it.

Edit the passage a comment thread highlights › Request Body

summary
​string · minLength: 1 · maxLength: 300 · required

One line on what you changed, shown with the edit in the thread.

​object[] · minItems: 1 · maxItems: 20

The change, as exact find-and-replace edits on the highlighted blocks' current text (the markdown your turn input shows under "The highlighted blocks"), applied in order, all or none. Each find is copied exactly (same characters, spacing and line breaks) from those blocks and occurs exactly once in them: include enough surrounding text to make it unique. replace is the new text. Only those blocks can change. Prefer this over content.

content
​string · minLength: 1 · maxLength: 40000

The highlighted blocks' WHOLE new markdown, only when the thread asks to rewrite all of them. It replaces those blocks, never anything else. Never send it with edits.

Edit the passage a comment thread highlights › Responses

The edit as the thread records it, and the blocks as they read now

​DocumentPassageEditDTO · required

Resolve or unresolve a comment

PATCH
https://api.productmind.ai
/workspaces/{workspaceId}/comments/{commentId}/resolve

Mark a comment thread as resolved (or undo a resolution). Resolved threads are typically hidden from the editor by default. Used by the Productmind agent after it addresses a piece of inline plan feedback - pair this with add-comment (kind=agent_response, parentCommentId=<id>) to leave a note explaining what changed.

Resolve or unresolve a comment › path Parameters

workspaceId
​string · required

Workspace UUID

commentId
​string · required

Comment UUID

Resolve or unresolve a comment › Request Body

resolved
​boolean · required

Resolve or unresolve a comment › Responses

200

Comment with updated resolution state

​CommentDTO · required