Productmind API

Chats are your conversations with the PM agent. List your chats, read one with its messages, start a new one, and stop a reply that is still being written. When the assistant has handed a chat over to a coding session, release the chat so your next message goes to the assistant again. See Finding your way around.


Stop the assistant's in-flight reply

POST
https://api.productmind.ai
/workspaces/{workspaceId}/chats/{id}/stop

Asks the agent to cancel the conversation's streaming turn — the agent itself, not just the stream. The run ends on its own stream with a run:error whose errorType is UserCancelled, and what arrived is kept as a user_stopped turn. stopped: false means the agent could not be asked, and the run finishes normally. Owner only.

Stop the assistant's in-flight reply › path Parameters

workspaceId
​string · required

Workspace UUID

id
​string · required

Chat UUID

Stop the assistant's in-flight reply › Request Body

requestId
​string · maxLength: 128

Stop the assistant's in-flight reply › Responses

200

Whether the agent could be asked to stop

​object · required

Release a conversation's coding-session latch

POST
https://api.productmind.ai
/workspaces/{workspaceId}/chats/{id}/detach-session

After a handoff the conversation is latched to the coding session it created (assistant sends are refused while it runs). Detaching releases the latch so the next message routes to the assistant again — "continue with the assistant". The session keeps its place in the transcript. Owner only.

Release a conversation's coding-session latch › path Parameters

workspaceId
​string · required

Workspace UUID

id
​string · required

Chat UUID

Release a conversation's coding-session latch › Request Body

Release a conversation's coding-session latch › Responses

200

The conversation, unlatched

​ChatDTO · required

List recently active chats

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

Returns the most recently updated AI chat conversations.

List recently active chats › path Parameters

workspaceId
​string · required

Workspace UUID

List recently active chats › Responses

200

Recent chats

​ChatDTO[] · required

List AI chats

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

Returns the AI chat conversations in this workspace that the authenticated user can see: their own, plus conversations shared with the workspace. An empty conversation is not listed. Paginated, most recently created first by default; pass sortBy=updatedAt for the most recently active first. Returns: id, title, messageCount, createdAt, updatedAt.

List AI chats › path Parameters

workspaceId
​string · required

Workspace UUID

List AI chats › query Parameters

page
​number

Page number (1-indexed, default 1)

limit
​number

Items per page (default 50)

sortBy
​string · enum

Field to sort by

Enum values:
title
createdAt
updatedAt
sortOrder
​string · enum

Sort direction (default desc)

Enum values:
asc
desc
search
​string

Full-text search across searchable fields

List AI chats › Responses

200

List of chats

​ChatDTO[] · required
​object
​object

Create a new AI chat

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

Start a new AI chat conversation, optionally linked to a workspace for context. Pass clientChatId, a UUID the client minted, to know the conversation's id before the request answers: a repeat with the same clientChatId creates nothing and returns the conversation already made, with a 200.

Create a new AI chat › path Parameters

workspaceId
​string · required

Workspace UUID

Create a new AI chat › Request Body

title
​string
initialMessage
​string · minLength: 1
agentId
​string
​object
clientChatId
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-…

An id the client minted for this conversation before creating it. The chat is stored under chatIdFor(workspaceId, userId, clientChatId), so the client knows its id at once, and a repeated create returns the conversation already made.

Create a new AI chat › Responses

The conversation already created under this clientChatId

​ChatDTO · required

Get a chat by ID with messages

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

Retrieve a single chat conversation including all its messages.

Get a chat by ID with messages › path Parameters

workspaceId
​string · required

Workspace UUID

id
​string · required

Chat UUID

Get a chat by ID with messages › Responses

200

Chat with messages

​ChatDTO · required