Skip to content

Workspace API

Workspace Knowledge

Pages, folders, sections, files and revisions — the workspace's own reference material that Spec and MCP clients search and cite.

Knowledge is the workspace’s own reference material: playbooks, ICP notes, positioning, pricing, call notes. It is written as markdown pages arranged in folders, with uploaded files attached. Spec searches it before answering and cites what it used. The same routes serve the web app, API keys, Spec and the Developer MCP.

Pages and folders

A page has a title, a folder path, an optional one-line description and a markdown body of up to 1,000,000 characters.

  • A folder is a path such as Go-to-market/Personas. Its segments are trimmed and empty ones dropped; '' is the root. Paths are at most 5 levels deep, 100 characters a segment and 300 characters overall. Folders exist only as page paths: there is nothing to create or delete separately.
  • A title is at most 200 characters. It cannot contain / or control characters, and it cannot look like a page id.
  • A page is addressed by its id or its ref, folder/Title (just Title at the root). URL-encode a ref in a path parameter: Go-to-market%2FICP.
  • The title is unique within its folder among live pages. A second create with the same folder and title answers 409 path_title_taken.
  • delete archives a page. An archived page leaves search but stays readable by id; restore brings it back.

Pages without a description get one written from their body after a save that leaves at least 200 characters. This is Parcel’s cost, not yours, and a description you set is never replaced.

Each page body is split into sections at its headings, and each converted file is split the same way. find searches sections (full text plus fuzzy heading matching) and returns the best matches with a snippet. Read the whole page, or just the section, with GET /workspace/knowledge/pages/{page}; a section id alone reads with GET /workspace/knowledge/sections/{section}.

Files

Upload DOCX, PPTX, XLSX, CSV, PDF, Markdown, plain text or an image, up to 20 MB each. A file is attached to a page; without page an upload makes a new page titled after the file.

  • Word, Markdown and text files become the body of a page that has none. Other files stay attached and are searchable as their own sections.
  • Conversion runs after the response. Poll the file’s status: pending while it converts, then ready, no_text (nothing readable, such as a scanned PDF) or failed with an error. An image is stored, not read: it is ready with no text.
  • retry converts a stored file again. remove deletes the file, its sections and the stored object; the page stays.
  • download returns the bytes exactly as uploaded.

Revisions and concurrency

Every write that changes a page records a revision with its author: the member, the Spec run, or the API key. A person’s saves fold into one revision for 10 minutes from its first save. List the newest 200, or read any one in full.

Every edit sends expected_revision. If the page has moved on, the write answers 409 revision_conflict with details.current_revision; read the page again and resend.

Plan, scopes and credits

Knowledge is on every plan, in the app, in Spec, and through API keys and MCP.

SurfaceScopeCredits
find, page reads, revisions, file reads and downloadsknowledge:read0
manage (and /batch), uploads (and /batch), retry, remove (and each /batch)knowledge:write0

Errors

Error envelope
{
"error": {
"code": "revision_conflict",
"message": "The page changed while saving; read it again.",
"details": { "current_revision": 4 }
}
}
CodeHTTPMeaning
bad_request400A field is missing or malformed (path, title, ref, id). A path or title refusal names it in details.field (path or title).
page_not_found, section_not_found, revision_not_found, file_not_found404Nothing matches in this workspace.
revision_conflict409expected_revision is stale; details.current_revision has the current one.
not_unique409str_replace’s old_text occurs zero or several times; details.count says how many.
path_title_taken409A live page already has that folder and title.
page_archived409The page is archived; restore it first.
file_busy409The file is still converting.
file_missing409The stored object is gone; upload the file again.
try_later—Batch item only: a retry batch converts 5 files a call; send the rest again.
too_large413The body would pass 1,000,000 characters, or a file is over 20 MB.