Skip to content
LogoLogo

Documents

Workspace rich-text Documents and their versioned content.

Read the Workspace Git-backed Documents repository

GET/api/v1/workspaces/{workspace_id}/knowledge-repository

Path Parameters

workspace_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Responses

Validate and connect one existing documentation repository

PUT/api/v1/workspaces/{workspace_id}/knowledge-repository

Requires explicit acknowledgement that every repository reader can read all mirrored Documents. The configured branch must already exist. No repository, branch, or pull request is created.

Path Parameters

workspace_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Header Parameters

X-CSRF-TokenRequired
string·min 43·max 43

Session-bound CSRF token. It must exactly match the __Host-assign_csrf cookie sent with the request.

Request Body

application/json
installation_idRequired
string <uuid>

Opaque Assign-owned UUIDv7 identifier. Clients must not derive meaning from it.

Example0198ac5e-f9b7-7000-8000-000000000001
resource_idRequired
string <uuid>

Opaque Assign-owned UUIDv7 identifier. Clients must not derive meaning from it.

Example0198ac5e-f9b7-7000-8000-000000000001
providerRequired
string
Values
githubgitlabbitbucket
repository_nameRequired
string·min 1·max 300
branchRequired
string·min 1·max 200
docs_rootRequired
string·min 1·max 500
sync_modeRequired
string
Values
outboundbidirectional
repository_readers_acknowledgedRequired
boolean

Must be true to acknowledge that repository readers can read every synchronized Document.

Responses

Pause, resume, or disconnect Git-backed Documents

PATCH/api/v1/workspaces/{workspace_id}/knowledge-repository

Path Parameters

workspace_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Header Parameters

X-CSRF-TokenRequired
string·min 43·max 43

Session-bound CSRF token. It must exactly match the __Host-assign_csrf cookie sent with the request.

Request Body

application/json
stateRequired
string
Values
pausedhealthydisconnected
revisionRequired
integer <int64>·min 1

Responses

Import bounded Markdown content from the connected repository

POST/api/v1/workspaces/{workspace_id}/knowledge-repository/import

Path Parameters

workspace_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Header Parameters

X-CSRF-TokenRequired
string·min 43·max 43

Session-bound CSRF token. It must exactly match the __Host-assign_csrf cookie sent with the request.

Responses

Synchronize pending Assign and Git changes now

POST/api/v1/workspaces/{workspace_id}/knowledge-repository/sync

Bypasses the debounce only. Current permission, expected-head, conflict, size, and rate gates still apply.

Path Parameters

workspace_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Header Parameters

X-CSRF-TokenRequired
string·min 43·max 43

Session-bound CSRF token. It must exactly match the __Host-assign_csrf cookie sent with the request.

Responses

List bounded repository synchronization history

GET/api/v1/workspaces/{workspace_id}/knowledge-repository/runs

Path Parameters

workspace_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Query Parameters

limit
integer·min 1·max 100·default 50

Maximum number of resources to return.

Responses

List open revision-bound synchronization conflicts

GET/api/v1/workspaces/{workspace_id}/knowledge-repository/conflicts

Path Parameters

workspace_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Query Parameters

limit
integer·min 1·max 100·default 50

Maximum number of resources to return.

Responses

Apply a revision-bound explicit conflict decision

POST/api/v1/workspaces/{workspace_id}/knowledge-repository/conflicts/{conflict_id}/resolve

Path Parameters

workspace_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001
conflict_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Header Parameters

X-CSRF-TokenRequired
string·min 43·max 43

Session-bound CSRF token. It must exactly match the __Host-assign_csrf cookie sent with the request.

Request Body

application/json
actionRequired
string
Values
keep_assignuse_gitmerge
expected_git_shaRequired
string
expected_document_revisionRequired
integer <int64>·min 1
merged_markdown
string·max 1048576

Responses

Query bounded editor reference and mention candidates

GET/api/v1/workspaces/{workspace_id}/reference-options

Returns grouped, permission-filtered candidates for Assign editor mentions and references. Matching is prefix-and-word based across active member display names, active Workspace Agent names, unarchived Document titles, unarchived Project names and keys, and unarchived Task titles and ticket references. Each requested type is independently limited; no cursor or total is exposed. A blank query returns an empty result.

Path Parameters

workspace_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Query Parameters

qRequired
string·min 0·max 100

Typeahead text. Leading and trailing whitespace is ignored; blank text returns no candidates.

types
string[]

Repeat to restrict result groups. Omitting it queries all five types.

Values
useragentdocumentprojecttask
limit
integer·min 1·max 20·default 10

Maximum candidates returned for each requested type. Defaults to 10.

surface
string·default comment

Comment (default) requires Agent Task-comment capability. Discuss includes ready installed Agents and active custom Agents without that capability; entitlement and Project or binding visibility still apply. Selection never grants execution authority.

Values
commentdiscuss

Responses

Read a published Document

GET/api/v1/public/documents/{public_id}

Public access requires the owning Workspace's public-publishing billing entitlement; absence returns the same privacy-safe 404 as an unavailable identifier. Returns only the public-safe title and content of an unarchived Document. The opaque public identifier is revoked when the Document is unpublished or archived. This route does not disclose Workspace, Project, hierarchy, membership, revision, or audit information.

Path Parameters

public_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Responses

Authorize a published Document attachment download

POST/api/v1/public/documents/{public_id}/attachments/{attachment_id}/download

Public access requires the owning Workspace's public-publishing billing entitlement; absence returns the same privacy-safe 404 as an unavailable identifier. Mints a short-lived download URL only when the attachment is owned by the published Document and is referenced by its current public body. Historical ownership alone never exposes a removed attachment.

Path Parameters

public_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001
attachment_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Responses

Authorize a published Document attachment preview

POST/api/v1/public/documents/{public_id}/attachments/{attachment_id}/preview

Public access requires the owning Workspace's public-publishing billing entitlement; absence returns the same privacy-safe 404 as an unavailable identifier. Mints a short-lived cookie-less inline URL for a previewable attachment that is both owned by and referenced from the current public body.

Path Parameters

public_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001
attachment_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Responses

List Workspace Documents

GET/api/v1/workspaces/{workspace_id}/documents

Returns one cursor-paginated page of active root Document metadata, or archived roots when archived_only=true. Title order is the default; sort selects modified-time order. Text, Project, location, scope, descendant, and archive selectors are applied before pagination; a cursor is valid only for the same selectors and sort. Content is not included; read it through the content operation.

location classifies a Document by structure only: workspace is Documents outside every Project and projects is Documents inside one. It never describes visibility or access; scope remains the audience filter. A nested Document always shares its parent's Project, so it is classified by the same rule.

include_descendants=true returns nested Documents as individual rows instead of roots only, each exactly once, with an ancestors path so a flattened result can show where it lives.

Path Parameters

workspace_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Query Parameters

project_id
string <uuid>

Restrict the page to Documents owned by this Project.

Example0198ac5e-f9b7-7000-8000-000000000001
q
string·min 1·max 200

Match terms across a Document title and extracted text.

scope
string

Restrict the page to one Document visibility scope.

Values
workspaceprojectpublic
archived_only
boolean·default false

Return archived roots for recovery instead of active roots.

location
string

Restrict the page by structural location. workspace returns Documents outside every Project; projects returns Documents that belong to a Project. Omit for both. Cannot be combined with project_id when workspace.

Values
workspaceprojects
sort
string·default title

Page order. title is ascending title (default), updated_desc is most recently modified first and updated_asc is least recently modified first, by each Document's own modification time. Ties break by identifier.

Values
titleupdated_descupdated_asc
include_descendants
boolean·default false

Return nested Documents as individual rows, each once, with their ancestor path.

cursor
string·min 1·max 2048

Opaque continuation cursor returned by the preceding page.

limit
integer·min 1·max 100·default 50

Maximum number of resources to return.

Responses

Create a Document

POST/api/v1/workspaces/{workspace_id}/documents

Canonical content with an unsupported schema or an attempted schema 2-to-1 downgrade returns 409 document_schema_version_unsupported. Restoring an older Document revision retains an existing schema 2 floor. Creates a Document with optional initial content. Omitting content creates an empty Document. Public Document creation and transitions to public visibility require the Workspace's public-publishing billing entitlement; denial returns 403 paid_workspace_required. Unpublishing and ordinary edits of an existing publication remain available subject to normal authorization. Public links are unavailable while the entitlement is absent.

Path Parameters

workspace_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Header Parameters

X-CSRF-TokenRequired
string·min 43·max 43

Session-bound CSRF token. It must exactly match the __Host-assign_csrf cookie sent with the request.

Idempotency-KeyRequired
string·min 16·max 200

Opaque client-generated key for safely retrying this operation.

Request Body

application/json
titleRequired
string·min 1·max 500
project_id
string <uuid>

Opaque Assign-owned UUIDv7 identifier. Clients must not derive meaning from it.

Example0198ac5e-f9b7-7000-8000-000000000001
visibility
string
Values
workspaceprojectpublic
parent_document_id
string <uuid>

Opaque Assign-owned UUIDv7 identifier. Clients must not derive meaning from it.

Example0198ac5e-f9b7-7000-8000-000000000001
content
object

Versioned, server-validated rich-text document. The server accepts only nodes and marks on the Assign allowlist and rejects anything outside it; the client's installed editor extension set is never authoritative. Complexity is bounded at 32 levels of nesting and 50,000 nodes in addition to the per-field byte limits.

Accepted nodes: doc, paragraph, text, heading, bulletList, orderedList, listItem, taskList, taskItem, blockquote, callout, codeBlock, blockMath, horizontalRule, hardBreak, image, file, plus the reference nodes userMention, projectReference, documentReference, and taskReference. Accepted marks: bold, italic, underline, strike, code, link.

A Task-description or Comment mutation accepts at most 100 distinct canonical user identifiers across its userMention nodes. Repeated mentions of the same user count once.

image and file name an Assign attachment through attrs.attachmentId and carry no URL and no bytes: attachments travel only through the attachment upload and download operations, and a signed URL is minted per request after a fresh authorization check rather than stored in content. A request whose image or file node omits attachmentId, or carries a URL-bearing attribute, is rejected.

callout has block children and exactly attrs.kind and attrs.icon. Kind is callout, note, tip, important, warning, or caution. Icon is null for the default Lucide icon, an emoji of at most 64 UTF-8 bytes, an allowlisted lucide:name token to override it, or an empty string to hide it. Unknown Lucide names are rejected. HTML, URLs and image data are not accepted as icons. Callouts are additive in schemas 1 and 2.

blockMath stores a required string attrs.latex; rendered math HTML and renderer settings are not persisted. Schema 1 retains the existing node contract; schema 2 additionally admits tables. Checklists, attachment blocks, display equations, underline, and projectReference were added additively, so every previously stored document is still valid and no migration is required.

Schema 2 additionally accepts table, tableRow, tableCell and tableHeader. A table has tableRow children; a row has tableCell/tableHeader children. Cells contain Assign blocks, starting with a paragraph; nested tables are rejected. Cells accept colspan/rowspan (integers 1–64, default 1), colwidth (null or one integer 24–2000 per spanned column), and align (null, left, center or right). Tables/rows have no attrs, marks or text; cells have no marks/text or other attributes. The occupancy grid must be rectangular with no overlap, holes or spans beyond its rows. Limits are 1000 rows, 64 logical columns and 10000 physical cells, still subject to each field's byte budget and global node/depth limits. Schema 1 rejects all four table nodes. Rich tables exchange through the named assign-table Markdown JSON fence; simple tables use GFM pipes.

Example{ "schema_version": 1, "type": "doc", "content": [] }

Responses

Resolve active Document metadata by Workspace path

GET/api/v1/workspaces/{workspace_id}/documents/by-path/{document_path}

Resolves an exact active Document path within the requested Workspace. Applies the same Workspace and Project read permissions as the Document identifier read. A missing, archived, or inaccessible Document returns 404. Use the returned identifier for content and subsequent Document reads.

Path Parameters

workspace_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001
document_pathRequired
string·min 1·max 200

Exact Document path within the Workspace.

Responses

GET/api/v1/documents/{document_id}/links

Scans at most 100 associations per page and returns only currently authorized live pairs. An empty page may have a continuation. Cursors are bound to the owner and Workspace. Links confer no access.

List Task Documents

GET/api/v1/tasks/{task_id}/documents

Scans at most 100 associations per page and returns only currently authorized live pairs. An empty page may have a continuation. Cursors are bound to the owner and Workspace. Links confer no access.

Path Parameters

task_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Query Parameters

cursor
string·min 1·max 2048

Opaque continuation cursor returned by the preceding page.

limit
integer·min 1·max 100·default 50

Maximum number of resources to return.

Responses

List Milestone Documents

GET/api/v1/milestones/{milestone_id}/documents

Scans at most 100 associations per page and returns only currently authorized live pairs. An empty page may have a continuation. Cursors are bound to the owner and Workspace. Links confer no access.

Path Parameters

milestone_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Query Parameters

cursor
string·min 1·max 2048

Opaque continuation cursor returned by the preceding page.

limit
integer·min 1·max 100·default 50

Maximum number of resources to return.

Responses

POST/api/v1/documents/{document_id}/links/{target_kind}/{target_id}

Requires write authority for both participants. Project-owned Documents can link only within their Project. A Workspace Document can link to any authorized Project. Pair creation and removal are idempotent. Public Document visibility does not publish associations.

DELETE/api/v1/documents/{document_id}/links/{target_kind}/{target_id}

Requires write authority for both participants. Project-owned Documents can link only within their Project. A Workspace Document can link to any authorized Project. Pair creation and removal are idempotent. Public Document visibility does not publish associations.

204Association removed or already absent.

Read Document metadata

GET/api/v1/documents/{document_id}

Path Parameters

document_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Responses

Update Document metadata

PATCH/api/v1/documents/{document_id}

Applies an optimistic compare-and-swap to Document metadata. Content is replaced through the separate content operation so a title rename never competes with an autosave for the same revision. Public Document creation and transitions to public visibility require the Workspace's public-publishing billing entitlement; denial returns 403 paid_workspace_required. Unpublishing and ordinary edits of an existing publication remain available subject to normal authorization. Public links are unavailable while the entitlement is absent.

Path Parameters

document_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Header Parameters

X-CSRF-TokenRequired
string·min 43·max 43

Session-bound CSRF token. It must exactly match the __Host-assign_csrf cookie sent with the request.

Idempotency-KeyRequired
string·min 16·max 200

Opaque client-generated key for safely retrying this operation.

If-MatchRequired
string

Entity tag containing the resource version last observed by the client.

Request Body

application/json
title
string·min 1·max 500
project_id
string <uuid>

Opaque Assign-owned UUIDv7 identifier. Clients must not derive meaning from it.

Example0198ac5e-f9b7-7000-8000-000000000001
visibility
string
Values
workspaceprojectpublic
parent_document_id
string <uuid>

Opaque Assign-owned UUIDv7 identifier. Clients must not derive meaning from it.

Example0198ac5e-f9b7-7000-8000-000000000001

Responses

Archive a Document

DELETE/api/v1/documents/{document_id}

Archives the Document. Archived Documents remain readable by identifier and continue to count against storage accounting until they are purged at the end of the retention window.

Path Parameters

document_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Header Parameters

X-CSRF-TokenRequired
string·min 43·max 43

Session-bound CSRF token. It must exactly match the __Host-assign_csrf cookie sent with the request.

Responses

Permanently delete a Document

DELETE/api/v1/documents/{document_id}/permanent

Permanently removes an active or archived leaf Document, including its revision history, collaboration state and resource links. Requires the same Workspace and owning Project write permission as editing. Documents with any child (including archived children) return 409 document_has_children. Git-bound Documents return 409 document_git_managed. A stale If-Match returns 409 revision_conflict. Attachment objects retain their existing cleanup policy. Archive and Restore use separate operations.

Path Parameters

document_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Header Parameters

X-CSRF-TokenRequired
string·min 43·max 43

Session-bound CSRF token. It must exactly match the __Host-assign_csrf cookie sent with the request.

If-MatchRequired
string

Entity tag containing the resource version last observed by the client.

Responses

Restore an archived Document

POST/api/v1/documents/{document_id}/restore

Path Parameters

document_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Header Parameters

X-CSRF-TokenRequired
string·min 43·max 43

Session-bound CSRF token. It must exactly match the __Host-assign_csrf cookie sent with the request.

If-MatchRequired
string

Entity tag containing the resource version last observed by the client.

Responses

List Document attachments

GET/api/v1/documents/{document_id}/attachments

Returns the newest 100 linked files. Optional attachment_id values select up to 100 exact linked targets regardless of age; deleted, unlinked and private Discuss files are omitted after parent authorization.

Path Parameters

document_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Query Parameters

attachment_id
string <uuid>[]·min 1·max 100

Exact attachment targets linked to this authorized parent, independent of the newest-file window. Repeat the query key for multiple IDs. At most 100 values; invalid or empty values return 400. Omit for the ordinary newest-100 shelf.

Responses

Attach a completed upload to a Document

POST/api/v1/documents/{document_id}/attachments

Establishes durable Document ownership before content stores the attachment identifier. The idempotent link remains while current or historical revisions may reference it and is removed with Document purge or explicit attachment deletion.

Path Parameters

document_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Header Parameters

X-CSRF-TokenRequired
string·min 43·max 43

Session-bound CSRF token. It must exactly match the __Host-assign_csrf cookie sent with the request.

Idempotency-KeyRequired
string·min 16·max 200

Opaque client-generated key for safely retrying this operation.

Request Body

application/json
attachment_idRequired
string <uuid>

Opaque Assign-owned UUIDv7 identifier. Clients must not derive meaning from it.

Example0198ac5e-f9b7-7000-8000-000000000001

Responses

List immutable Document revisions

GET/api/v1/documents/{document_id}/revisions

Path Parameters

document_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Query Parameters

cursor
string·min 1·max 2048

Opaque continuation cursor returned by the preceding page.

limit
integer·min 1·max 100·default 50

Maximum number of resources to return.

Responses

Compare two immutable Document revisions

GET/api/v1/documents/{document_id}/revisions/compare

Path Parameters

document_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Query Parameters

fromRequired
integer·min 1
toRequired
integer·min 1

Responses

Read one immutable Document revision

GET/api/v1/documents/{document_id}/revisions/{revision}

Path Parameters

document_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001
revisionRequired
integer·min 1

Responses

Restore a historical snapshot as a new active revision

POST/api/v1/documents/{document_id}/revisions/{revision}/restore

The source snapshot remains immutable. The current Document revision must be supplied in If-Match. Canonical content with an unsupported schema or an attempted schema 2-to-1 downgrade returns 409 document_schema_version_unsupported. Restoring an older Document revision retains an existing schema 2 floor.

Path Parameters

document_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001
revisionRequired
integer·min 1

Header Parameters

X-CSRF-TokenRequired
string·min 43·max 43

Session-bound CSRF token. It must exactly match the __Host-assign_csrf cookie sent with the request.

If-MatchRequired
string

Entity tag containing the resource version last observed by the client.

Responses

Export current or historical Document content as Markdown

GET/api/v1/documents/{document_id}/markdown

Path Parameters

document_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Query Parameters

revision
integer·min 1

Responses

Replace Document content from Markdown

PUT/api/v1/documents/{document_id}/markdown

Accepts bounded valid UTF-8 Markdown. Supported Assign-profile constructs become structured content; unsupported blocks and inline constructs are preserved as inert literal Markdown. Raw HTML is never executed, and tables remain literal until a versioned table format is available.

Path Parameters

document_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Header Parameters

X-CSRF-TokenRequired
string·min 43·max 43

Session-bound CSRF token. It must exactly match the __Host-assign_csrf cookie sent with the request.

If-MatchRequired
string

Entity tag containing the resource version last observed by the client.

Request Body

text/markdown

Responses

List direct child Documents

GET/api/v1/documents/{document_id}/children

Returns one cursor-paginated page of direct children the caller may read, title-ordered unless sort selects modified-time order.

Path Parameters

document_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Query Parameters

sort
string·default title

Sibling order. title (default), updated_desc or updated_asc, matching the workspace Document collection.

Values
titleupdated_descupdated_asc
cursor
string·min 1·max 2048

Opaque continuation cursor returned by the preceding page.

limit
integer·min 1·max 100·default 50

Maximum number of resources to return.

Responses

Read versioned Document content

GET/api/v1/documents/{document_id}/content

Path Parameters

document_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Responses

Replace versioned Document content

PUT/api/v1/documents/{document_id}/content

Canonical content with an unsupported schema or an attempted schema 2-to-1 downgrade returns 409 document_schema_version_unsupported. Restoring an older Document revision retains an existing schema 2 floor. Replaces Document content through versioned optimistic autosave. The client sends the revision it edited in If-Match. A stale revision is refused with 409 carrying the current server content, so the client can keep its local draft and offer compare, reload, or retry without a second request. Success means durably acknowledged.

This is not a collaborative editing protocol: no CRDT, operational transform, presence, or admission behaviour is implied.

Path Parameters

document_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Header Parameters

X-CSRF-TokenRequired
string·min 43·max 43

Session-bound CSRF token. It must exactly match the __Host-assign_csrf cookie sent with the request.

If-MatchRequired
string

Entity tag containing the resource version last observed by the client.

Request Body

application/json
contentRequired
object

Versioned, server-validated rich-text document. The server accepts only nodes and marks on the Assign allowlist and rejects anything outside it; the client's installed editor extension set is never authoritative. Complexity is bounded at 32 levels of nesting and 50,000 nodes in addition to the per-field byte limits.

Accepted nodes: doc, paragraph, text, heading, bulletList, orderedList, listItem, taskList, taskItem, blockquote, callout, codeBlock, blockMath, horizontalRule, hardBreak, image, file, plus the reference nodes userMention, projectReference, documentReference, and taskReference. Accepted marks: bold, italic, underline, strike, code, link.

A Task-description or Comment mutation accepts at most 100 distinct canonical user identifiers across its userMention nodes. Repeated mentions of the same user count once.

image and file name an Assign attachment through attrs.attachmentId and carry no URL and no bytes: attachments travel only through the attachment upload and download operations, and a signed URL is minted per request after a fresh authorization check rather than stored in content. A request whose image or file node omits attachmentId, or carries a URL-bearing attribute, is rejected.

callout has block children and exactly attrs.kind and attrs.icon. Kind is callout, note, tip, important, warning, or caution. Icon is null for the default Lucide icon, an emoji of at most 64 UTF-8 bytes, an allowlisted lucide:name token to override it, or an empty string to hide it. Unknown Lucide names are rejected. HTML, URLs and image data are not accepted as icons. Callouts are additive in schemas 1 and 2.

blockMath stores a required string attrs.latex; rendered math HTML and renderer settings are not persisted. Schema 1 retains the existing node contract; schema 2 additionally admits tables. Checklists, attachment blocks, display equations, underline, and projectReference were added additively, so every previously stored document is still valid and no migration is required.

Schema 2 additionally accepts table, tableRow, tableCell and tableHeader. A table has tableRow children; a row has tableCell/tableHeader children. Cells contain Assign blocks, starting with a paragraph; nested tables are rejected. Cells accept colspan/rowspan (integers 1–64, default 1), colwidth (null or one integer 24–2000 per spanned column), and align (null, left, center or right). Tables/rows have no attrs, marks or text; cells have no marks/text or other attributes. The occupancy grid must be rectangular with no overlap, holes or spans beyond its rows. Limits are 1000 rows, 64 logical columns and 10000 physical cells, still subject to each field's byte budget and global node/depth limits. Schema 1 rejects all four table nodes. Rich tables exchange through the named assign-table Markdown JSON fence; simple tables use GFM pipes.

Example{ "schema_version": 1, "type": "doc", "content": [] }

Responses

Admit an independent Document collaboration-presence lease

POST/api/v1/documents/{document_id}/collaboration-sessions

Evaluates the caller's current Document permission and creates an independent session for this browser client. A caller with read-only access receives role viewer; a caller who may edit receives editor. The opaque admission_token lasts five minutes, is scoped to this Document, actor, and session, and authorizes nothing on this HTTP API. Each admission has its own token and exclusive connection lease, so another tab cannot invalidate it. The connected relay renews the lease; disconnected sessions expire through bounded cleanup.

The lease admits the browser-only durable Yjs relay. Raw updates, checkpoints and awareness are not REST or SDK payloads. Resource schema capability is checked at admission and again for each update/checkpoint.

X-Assign-Document-Schema defaults to 1. An editable schema 2 admission promotes only this resource's envelope through its normal revision transition, preserving opaque updates, checkpoints and replica generation. Existing schema 1 resources continue to accept schema 1 clients. Once promoted, schema 1 admission and already admitted schema 1 writes fail with document_schema_version_unsupported. Invalid header values fail with document_schema_version_unsupported. Project permissions remain authoritative.

Path Parameters

document_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Header Parameters

X-CSRF-TokenRequired
string·min 43·max 43

Session-bound CSRF token. It must exactly match the __Host-assign_csrf cookie sent with the request.

X-Assign-Document-Schema
integer·default 1

Highest writable document schema supported by this client. Missing means schema 1. Editable schema 2 admission atomically promotes the resource envelope without resetting its collaboration state. Older admissions are refused after promotion.

Values
12

Responses

End the caller's Document collaboration-presence lease

DELETE/api/v1/documents/{document_id}/collaboration-sessions/{session_id}

Ends only the caller's own session. Repeating a successful end remains successful. A nonexistent or somebody else's session returns 404 so the operation cannot disclose collaborator presence. No Workspace event or Activity item is written.

Path Parameters

document_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001
session_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Header Parameters

X-CSRF-TokenRequired
string·min 43·max 43

Session-bound CSRF token. It must exactly match the __Host-assign_csrf cookie sent with the request.

Responses