Productmind API

Knowledge base

The knowledge base holds your workspace's reference documents. Create, edit, organize and delete documents, add a website or pages from a connected tool, have AI regenerate a system document, and link a document to the applications and features it describes. Search it or ask it a question, review changes the AI proposes, and browse or restore a document's earlier versions. See Knowledge base.


List the knowledge-base tag vocabulary

GET
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/tags

The distinct tags in use across the workspace's knowledge-base documents, with how many documents carry each. These names are what knowledge-base search filters match (the search tool's tags argument and an agent's kbFilters), so choose filter values from this vocabulary — and prefer an existing name over minting a near-duplicate when tagging.

List the knowledge-base tag vocabulary › path Parameters

workspaceId
​string · required

Workspace UUID

List the knowledge-base tag vocabulary › Responses

200

Tag names with document counts, alphabetical

​TagVocabularyEntryDTO[] · required

Check what knowledge base indexing would start on its own

GET
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/follow-on

Answers what indexing a new source (an upload, a website, an imported or generated document) would start on its own in this workspace, all on the organization's AI credits: the Overview is redrafted when it was never generated, or was generated and never edited (overviewRefresh), and, in a workspace with no features yet, indexing that Overview drafts starter features and writes a specification for each (starterFeatures). estimate is a measured estimate of what a newly indexed source would start, in AI credits and in cents at the plan's price (null when the plan sets no AI credit price); 0 when nothing would run. Nothing runs and nothing is charged.

Check what knowledge base indexing would start on its own › path Parameters

workspaceId
​string · required

Workspace UUID

Check what knowledge base indexing would start on its own › Responses

200

What indexing would start on its own, and its estimate

​KnowledgeBaseFollowOnDTO · required

List knowledge base documents in a workspace

GET
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/documents

Returns all editable documents in the workspace knowledge base — system docs (overview, personas, …) plus user-uploaded files, scraped websites, connector imports, and manual documents. Does not include the contentLexical payload; use get-kb-document for full content.

List knowledge base documents in a workspace › path Parameters

workspaceId
​string · required

Workspace UUID

List knowledge base documents in a workspace › query Parameters

page
​number

Page number (1-indexed, default 1)

limit
​number

Items per page (default 50)

search
​string

Full-text search across searchable fields

List knowledge base documents in a workspace › Responses

200

List of KB documents

​object
​object

Create a new knowledge base document

POST
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/documents

Creates a KB document. Without content it is an empty manual document the user edits in the app. With content (full markdown) the server derives the editable state, snapshots version 1, and marks the document as generated: use this for agent-produced documentation. parentDocumentId nests the document in the KB tree (system documents cannot be parents); applicationId auto-links it to that application; availableToAgents: true indexes it for agent search, on the organization's AI credits; when the organization cannot pay for indexing now, the document is still created and shared, and waits to be indexed (metadata.indexDeferred) until it can. Indexing can start more work on its own, also on AI credits: an Overview that was never generated, or was generated and never edited, is redrafted from the new content, and in a workspace with no features yet, indexing the Overview drafts starter features and writes a specification for each. To CHANGE an existing document's content, use propose-kb-document-content, never create a duplicate.

Create a new knowledge base document › path Parameters

workspaceId
​string · required

Workspace UUID

Create a new knowledge base document › Request Body

title
​string · minLength: 1 · maxLength: 255 · required
description
​string · maxLength: 2000
content
​string · maxLength: 300000

Optional initial markdown body. When set, the server derives the editable Lexical/Y.Doc state, snapshots version 1, and marks the document as generated.

parentDocumentId
​string

Optional parent KB document id — creates this document as a child node in the document tree. System documents cannot be parents or children.

applicationId
​string

Optional application id to auto-link this document to (kb_document documents application).

availableToAgents
​boolean

Share the document with agents (chunk + embed) once content is saved. Defaults to false; only meaningful together with content.

tags
​string[] · maxItems: 20

Optional content-domain tags — product (specs, overviews, personas, UX), engineering (technical documentation), research (interviews, competitor/market research). Agents filter KB search on this axis. When omitted, a document created with content defaults to ["engineering"]; providing the field (even an empty array) is honored exactly.

Enum values:
product
engineering
research

Create a new knowledge base document › Responses

Document created

​KnowledgeBaseDocumentDTO · required

Delete multiple knowledge base documents in one request

DELETE
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/documents

Deletes every document in ids. Cascade-aware: selecting a parent plus some of its descendants only fires the parent delete — the subtree is removed once, not twice. System documents inside the selection are rejected with a 400.

Delete multiple knowledge base documents in one request › path Parameters

workspaceId
​string · required

Workspace UUID

Delete multiple knowledge base documents in one request › Request Body

ids
​string[] · minItems: 1 · required

Delete multiple knowledge base documents in one request › Responses

200

Documents deleted

​object · required

Reorder a KB document among its siblings and/or re-parent it

PUT
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/documents/{documentId}/reorder

sortOrder is the 0-based target position among siblings; parentDocumentId: null moves the document to the root level. System documents cannot be nested or become parents. UI drag-and-drop only.

Reorder a KB document among its siblings and/or re-parent it › path Parameters

workspaceId
​string · required

Workspace UUID

documentId
​string · required

KB document UUID

Reorder a KB document among its siblings and/or re-parent it › Request Body

sortOrder
​integer · min: 0 · max: 9007199254740991 · required
​

Reorder a KB document among its siblings and/or re-parent it › Responses

200

Document reordered


List the applications/features a KB document is linked to

GET
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/documents/{documentId}/links

Returns the entities this document documents (kb_document → application|feature links), with display names and the per-link last-scanned commit baseline.

List the applications/features a KB document is linked to › path Parameters

workspaceId
​string · required

Workspace UUID

documentId
​string · required

KB document UUID

List the applications/features a KB document is linked to › Responses

200

Links for the document

​KbDocumentLinkDTO[] · required
​object
​object

POST
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/documents/{documentId}/links

Creates a documents relationship from the KB document to the named application or feature (idempotent — re-linking an existing pair is a no-op). Linked documentation surfaces on the target's Documentation rail and grounds coding sessions that run against the application.

workspaceId
​string · required

Workspace UUID

documentId
​string · required

KB document UUID

entityType
​string · enum · required

Target entity type

Enum values:
application
feature
entityId
​string · minLength: 1 · required

Target entity UUID (application or feature id)

200

Updated links for the document

​KbDocumentLinkDTO[] · required
​object
​object

List content proposals for a KB document

GET
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/documents/{documentId}/proposals

Agent-drafted content rewrites awaiting review (or settled history). Pass ?activeOnly=true for the single pending proposal.

List content proposals for a KB document › path Parameters

workspaceId
​string · required

Workspace UUID

documentId
​string · required

KB document UUID

List content proposals for a KB document › query Parameters

status
​string · enum

Filter by status

Enum values:
awaiting_review
approved
applied
dismissed
failed
activeOnly
​boolean

Only the active proposal, if any

List content proposals for a KB document › Responses

200

Proposals

​object
​object

Propose a full content rewrite for an existing KB document

POST
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/documents/{documentId}/proposals

Submits the FULL replacement markdown for an EXISTING knowledge base document as a proposal a human reviews (rendered block diff) before it lands — use this instead of update-kb-document or any direct write for every agent-driven content change. Include the sessionId from your Context section. Returns 409 if a proposal is already pending for the document — skip it and mention that in your report notes.

Propose a full content rewrite for an existing KB document › path Parameters

workspaceId
​string · required

Workspace UUID

documentId
​string · required

KB document UUID

Propose a full content rewrite for an existing KB document › Request Body

proposedContentMarkdown
​string · minLength: 1 · maxLength: 300000 · required

The FULL replacement markdown for the document. Code citations are link tokens — path/to/file.ext:line @ — never wrapped in backticks; the sha is the HEAD of the clone you read.

summary
​string · maxLength: 4096

One-paragraph summary of what changed and why

sessionId
​string

The session id (from the Context section of your instructions)

commentId
​string

When you answer a comment thread on this document (your turn input names it): the thread's id, exactly as given. The suggestion is then linked to the thread, and applying it resolves the thread. Only the thread you were asked to answer, while you answer it; omit it otherwise.

Propose a full content rewrite for an existing KB document › Responses

Proposal created (awaiting review)


Approve a proposal without applying it (PR-rail review)

POST
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/documents/{documentId}/proposals/{proposalId}/approve

Freezes the human-composed markdown; the PR-merge webhook applies it when the code PR merges. Human review surface only.

Approve a proposal without applying it (PR-rail review) › path Parameters

workspaceId
​string · required

Workspace UUID

documentId
​string · required

KB document UUID

proposalId
​string · required

Proposal UUID

Approve a proposal without applying it (PR-rail review) › Request Body

content
​string · minLength: 1 · maxLength: 300000 · required
draftVersion
​integer · min: 0 · max: 9007199254740991

Approve a proposal without applying it (PR-rail review) › Responses

200

Proposal approved


Apply the composed markdown of a proposal to the document

POST
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/documents/{documentId}/proposals/{proposalId}/apply

Writes the reviewer-composed markdown through the versioned save-content path (pre-apply snapshot = restore point), settles the proposal, and stamps scan baselines. Human review surface only.

Apply the composed markdown of a proposal to the document › path Parameters

workspaceId
​string · required

Workspace UUID

documentId
​string · required

KB document UUID

proposalId
​string · required

Proposal UUID

Apply the composed markdown of a proposal to the document › Request Body

content
​string · minLength: 1 · maxLength: 300000 · required
draftVersion
​integer · min: 0 · max: 9007199254740991

Apply the composed markdown of a proposal to the document › Responses

200

Proposal applied


Dismiss a proposal wholesale

POST
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/documents/{documentId}/proposals/{proposalId}/dismiss

The scan baseline is NOT advanced. Human review surface only.

Dismiss a proposal wholesale › path Parameters

workspaceId
​string · required

Workspace UUID

documentId
​string · required

KB document UUID

proposalId
​string · required

Proposal UUID

Dismiss a proposal wholesale › Responses

200

Proposal dismissed


List the knowledge base proposals awaiting review

GET
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/document-proposals

The workspace's proposed changes to its knowledge base that are waiting for someone to review them: rewrites of existing documents and new documents alike, newest first. Each row names what the proposal targets and where it came from; open the proposal to see its content.

List the knowledge base proposals awaiting review › path Parameters

workspaceId
​string · required

Workspace UUID

List the knowledge base proposals awaiting review › query Parameters

status
​string · enum · required

Which proposals: awaiting_review, the ones waiting for someone to review them.

Enum values:
awaiting_review
forMe
​string · enum

true: only the proposals drafted by a session FOR the caller (assigned to them, started by them, or in the view of a team they are on), the sidebar's Knowledge base count. Default false: every proposal.

Enum values:
true
false
page
​integer · min: 1 · max: 9007199254740991

Page number, from 1 (default 1)

limit
​integer · min: 1 · max: 100

Proposals per page, at most 100 (default 50)

List the knowledge base proposals awaiting review › Responses

Proposals awaiting review

​object
​object

Propose a NEW knowledge base document for an application

POST
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/document-proposals

Use this when an application in your session Context has NO technical documentation (hasTechnicalDocs: false), or its documentation tree is missing a section — it proposes a document that does not exist yet. Nothing is created now: the proposal is reviewed by a human in the session's PR activity rail, and the document is created and linked to the application when the code PR merges. Returns the proposal; its id is what a child section passes as parentProposalId to nest under a root you proposed in the same session (propose the root FIRST). Include the sessionId from your Context section. Never use create-kb-document for documentation a human should review first. Returns 409 when a creation with this title is already pending for the application — skip it and mention that in your report notes.

Propose a NEW knowledge base document for an application › path Parameters

workspaceId
​string · required

Workspace UUID

Propose a NEW knowledge base document for an application › Request Body

title
​string · minLength: 1 · maxLength: 255 · required

The title the document will be created with. The root of an application's technical documentation is " — Technical Docs"; a child is its section name ("Architecture Overview", "Setup Guide").

proposedContentMarkdown
​string · minLength: 1 · maxLength: 300000 · required

The FULL markdown of the new document. Code citations are link tokens — path/to/file.ext:line @ — never wrapped in backticks; the sha is the HEAD of the clone you read.

applicationId
​string · minLength: 1 · required

The Application this document documents (its id from the Context). The created document is linked to it.

parentDocumentId
​string

An EXISTING document to nest the new one under. Omit for a root document. Use parentProposalId instead when the parent is another creation you proposed in this same session.

parentProposalId
​string

The id returned by an earlier propose-kb-document-creation call in this session whose document the new one nests under — how a child is attached beneath a root that does not exist yet. Resolved when both are applied; a dismissed parent puts the child at root.

summary
​string · maxLength: 4096

One paragraph: why this document is needed and which changed files motivated it

sessionId
​string

The session id (from the Context section of your instructions)

Propose a NEW knowledge base document for an application › Responses

Creation proposal recorded (awaiting review)


Approve a document-creation proposal without applying it (PR-rail review)

POST
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/document-proposals/{proposalId}/approve

Freezes the human-composed markdown; the PR-merge webhook creates and links the document when the code PR merges. Human review surface only.

Approve a document-creation proposal without applying it (PR-rail review) › path Parameters

workspaceId
​string · required

Workspace UUID

proposalId
​string · required

Proposal UUID

Approve a document-creation proposal without applying it (PR-rail review) › Request Body

content
​string · minLength: 1 · maxLength: 300000 · required
draftVersion
​integer · min: 0 · max: 9007199254740991

Approve a document-creation proposal without applying it (PR-rail review) › Responses

200

Proposal approved


Dismiss a proposal wholesale, by proposal id

POST
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/document-proposals/{proposalId}/dismiss

The proposal-scoped dismiss — either kind; the one route a creation proposal (which has no document) can be dismissed through. Human review surface only.

Dismiss a proposal wholesale, by proposal id › path Parameters

workspaceId
​string · required

Workspace UUID

proposalId
​string · required

Proposal UUID

Dismiss a proposal wholesale, by proposal id › Responses

200

Proposal dismissed


DELETE
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/documents/{documentId}/links/{entityType}/{entityId}

Idempotent — removing an absent link is a no-op.

Remove a KB document ↔ entity link › path Parameters

workspaceId
​string · required

Workspace UUID

documentId
​string · required

KB document UUID

entityType
​string · required

Link target type: application | feature

entityId
​string · required

Target entity UUID

Remove a KB document ↔ entity link › Responses

200

Updated links for the document

​KbDocumentLinkDTO[] · required
​object
​object

Get a knowledge base document by ID

GET
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/documents/{documentId}

Retrieve a single KB document with its markdown content and metadata. The heavy contentLexical CRDT payload is omitted by default; pass ?includeLexical=true if you are the collaborative editor and need to bootstrap.

Get a knowledge base document by ID › path Parameters

workspaceId
​string · required

Workspace UUID

documentId
​string · required

KB document UUID

Get a knowledge base document by ID › query Parameters

includeLexical
​string · enum

Opt in to receive the Lexical CRDT payload alongside markdown. Defaults to false — only the collaborative editor needs it.

Enum values:
true
false

Get a knowledge base document by ID › Responses

200

KB document details

​KnowledgeBaseDocumentDTO · required

Update a KB document's metadata (title, tags, description)

PATCH
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/documents/{documentId}

Renames a document, or changes its tags or description. The title is trimmed and must be 1 to 255 characters; sending the current title changes nothing. A rename is refused with 409 for a system document (Overview, Personas, User experience and Competitors keep their names), when another document in the workspace already has exactly that title, and for a document synced from a repository (change its title in the repository instead). Search results show the new name straight away. The document's content is edited in the document editor, not through this endpoint.

Update a KB document's metadata (title, tags, description) › path Parameters

workspaceId
​string · required

Workspace UUID

documentId
​string · required

KB document UUID

Update a KB document's metadata (title, tags, description) › Request Body

title
​string · minLength: 1 · maxLength: 255

Rename the document. Trimmed, then 1 to 255 characters. Refused with 409: on a system document (Overview, Personas, User experience, Competitors keep their names; kb_document_title_fixed), when another document in the workspace already has exactly this title (kb_document_title_taken), and on a document synced from a repository (change its title in the repository; kb_document_repository_synced).

tags
​string[] · maxItems: 20
description
​string · maxLength: 2000

Update a KB document's metadata (title, tags, description) › Responses

Updated document


Get a system knowledge base document by its stable type slug

GET
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/documents/by-type/{type}

Returns a single system document addressable by stable type slug (e.g. overview, personas). Only system documents are addressable this way — manual / imported documents are reachable only via search. Returns markdown content plus metadata; the heavy contentLexical CRDT payload is omitted unless ?includeLexical=true is passed.

Get a system knowledge base document by its stable type slug › path Parameters

workspaceId
​string · required

Workspace UUID

type
​string · required

Stable kebab-case slug — e.g. overview, user-experience, personas.

Get a system knowledge base document by its stable type slug › query Parameters

includeLexical
​string · enum

Opt in to receive the Lexical CRDT payload alongside markdown. Defaults to false — only the collaborative editor needs it.

Enum values:
true
false

Get a system knowledge base document by its stable type slug › Responses

200

KB document details

​KnowledgeBaseDocumentDTO · required

Trigger AI generation for a wired system document (async)

POST
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/documents/{documentId}/generate

Starts AI generation of a wired system document (the Overview, User experience or Personas) in the background, on the organization's AI credits, and returns 202 at once with the document in its current state. Wait for a doc:persisted frame on this documentId on the workspace WebSocket, then read the document again. The generated document is indexed for agent search when it lands. Indexing can start more work on its own, also on AI credits: an Overview that was never generated, or was generated and never edited, is redrafted from the new content, and in a workspace with no features yet, indexing the Overview drafts starter features and writes a specification for each.

Trigger AI generation for a wired system document (async) › path Parameters

workspaceId
​string · required

Workspace UUID

documentId
​string · required

KB document UUID

Trigger AI generation for a wired system document (async) › Responses

Generation task accepted; result will arrive over the WebSocket

​KnowledgeBaseDocumentDTO · required

Save KB document content from a non-collaborative editor

POST
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/documents/{documentId}/save-content

Writes a markdown body to the KB document, rebuilds the Y.Doc binary, broadcasts doc:reset to any open CollabEditor on the same room, and emits doc:persisted so KB document queries refetch. Used by single-user surfaces that edit outside the CollabEditor.

Save KB document content from a non-collaborative editor › path Parameters

workspaceId
​string · required

Workspace UUID

documentId
​string · required

KB document UUID

Save KB document content from a non-collaborative editor › Request Body

content
​string · required

Save KB document content from a non-collaborative editor › Responses

200

Saved document

​KnowledgeBaseDocumentDTO · required

POST
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/search

Perform vector similarity search across all indexed documents in the workspace. Returns matching text chunks ranked by relevance.

Search the knowledge base using semantic search › path Parameters

workspaceId
​string · required

Workspace UUID

Search the knowledge base using semantic search › Request Body

query
​string · minLength: 1 · required
mode
​string · enum
Enum values:
semantic
hybrid
lexical
Default: hybrid
limit
​number · min: 1 · max: 50
Default: 3
​
tags
​string[]
excludeTags
​string[]

Search the knowledge base using semantic search › Responses

200

Search results

​KnowledgeBaseSearchResponseDTO · required

Query knowledge base with RAG

POST
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/rag

Ask a question and get an AI-generated answer grounded in the workspace's knowledge base documents.

Query knowledge base with RAG › path Parameters

workspaceId
​string · required

Workspace UUID

Query knowledge base with RAG › Request Body

question
​string · minLength: 1 · maxLength: 2000 · required
promptTemplate
​string · minLength: 1 · maxLength: 10000 · required
mode
​string · enum
Enum values:
semantic
hybrid
lexical
Default: hybrid
limit
​number · min: 1 · max: 20
Default: 5
tags
​string[]

Query knowledge base with RAG › Responses

200

RAG response with answer and sources

​KnowledgeBaseRagResponseDTO · required

Scrape a website and add it to the knowledge base

POST
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/scrape

Starts an asynchronous scrape of a website into a new knowledge base document; read the document with get-kb-document to follow its progress. With makeAvailableToAgents (the default) the pages are indexed for agent search on the organization's AI credits. Indexing can start more work on its own, also on AI credits: an Overview that was never generated, or was generated and never edited, is redrafted from the new content, and in a workspace with no features yet, indexing the Overview drafts starter features and writes a specification for each. When the organization cannot pay for indexing now, the site is still scraped, stored and shared, and indexing says it waits: it is indexed with no further action once the organization can pay.

Scrape a website and add it to the knowledge base › path Parameters

workspaceId
​string · required

Workspace UUID

Scrape a website and add it to the knowledge base › Request Body

url
​string · uri · required
maxPages
​number · min: 1 · max: 50
Default: 10
maxDepth
​number · min: 1 · max: 5
Default: 2
chunkingStrategy
​string · enum
Enum values:
standard
contextual
summarize
​boolean
Default: false
tags
​string[] · maxItems: 20

Optional tags for the scraped document — free-form names, applied as user tags

makeAvailableToAgents
​boolean
Default: true

Scrape a website and add it to the knowledge base › Responses

Scrape task created

​object · required

Ingest documents from a connected integration into the knowledge base

POST
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/ingest-connector-items

Starts a workforce workflow that fetches the selected items from a source connector, converts them to markdown, and pushes the content into the knowledge base via the ingest-text-document callback.

Ingest documents from a connected integration into the knowledge base › path Parameters

workspaceId
​string · required

Workspace UUID

Ingest documents from a connected integration into the knowledge base › Request Body

connectorInstanceId
​string · minLength: 1 · required
provider
​string · enum · required
Enum values:
google-docs
notion-pages
confluence-pages
​object[] · minItems: 1 · maxItems: 50 · required

Ingest documents from a connected integration into the knowledge base › Responses

Workflow execution queued

​IngestConnectorItemsResponseDTO · required

Create a knowledge base document from raw text content

POST
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/ingest-text-document

Invoked by the workforce productmind.workspace.ingest_text_document action after it has fetched and converted a document.

Create a knowledge base document from raw text content › path Parameters

workspaceId
​string · required

Workspace UUID

Create a knowledge base document from raw text content › Request Body

name
​string · minLength: 1 · required
content
​string · minLength: 1 · required
​KnowledgeBaseConnectorRef · required
chunkingStrategy
​string · enum
Enum values:
standard
contextual
userId
​string

Ignored. The document is attributed to the person the request acts as, never to a person this field names.

Create a knowledge base document from raw text content › Responses

Document created and indexing queued

​IngestTextDocumentResponseDTO · required

List version history for a knowledge base document

GET
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/documents/{documentId}/versions

Returns every persisted snapshot of a KB document, newest first. Use this to inspect prior content, attribute changes to specific authors, or pick a version to restore.

List version history for a knowledge base document › path Parameters

workspaceId
​string · required

Workspace UUID

documentId
​string · required

KB document UUID

List version history for a knowledge base document › query Parameters

documentId
​string · required

Knowledge base document UUID

page
​number

Page number (1-indexed, default 1)

limit
​number

Items per page (default 50)

search
​string

Full-text search across searchable fields

List version history for a knowledge base document › Responses

200

List of KB document versions

​object
​object

Get a single KB document version

GET
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/documents/{documentId}/versions/{versionId}

Fetch one historical version including its Lexical JSON state and the markdown projection. Useful for diff-rendering a snapshot or previewing before restore.

Get a single KB document version › path Parameters

workspaceId
​string · required

Workspace UUID

documentId
​string · required

KB document UUID

versionId
​string · required

Version UUID

Get a single KB document version › Responses

200

KB document version detail


Name a KB document version

PATCH
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/documents/{documentId}/versions/{versionId}

Attach (or clear) a human-readable summary so the version surfaces nicely in the history panel.

Name a KB document version › path Parameters

workspaceId
​string · required

Workspace UUID

documentId
​string · required

KB document UUID

versionId
​string · required

Version UUID

Name a KB document version › Request Body

Name a KB document version › Responses

200

Renamed KB document version

​KnowledgeBaseDocumentVersionDTO · required

Restore a KB document to a historical version

POST
https://api.productmind.ai
/workspaces/{workspaceId}/knowledge-base/documents/{documentId}/versions/{versionId}/restore

Roll a KB document back to a prior version. Creates a new snapshot mirroring the chosen version, writes it to the live document, broadcasts doc:reset so any open editor reloads, and flips the document's isStale flag so the user is prompted to reindex.

Restore a KB document to a historical version › path Parameters

workspaceId
​string · required

Workspace UUID

documentId
​string · required

KB document UUID

versionId
​string · required

Version UUID

Restore a KB document to a historical version › Responses

200

Restored KB document

​KnowledgeBaseDocumentDTO · required