Skip to content

documents

Knowledge module · 5 operations

List document rows

GET/documents

A document with versions. Files are stored in tenant-scoped storage. Returns a cursor page of document rows the caller may see. The default order is `created_at` ascending. Supports sparse fieldsets and the filter grammar.

Create a document

POST/documents

A document with versions. Files are stored in tenant-scoped storage. Creates a document. Requires `Idempotency-Key`; a replay returns the original response. The organization is derived from the credential or the parent row, never from the body.

Get a document

GET/documents/{id}

A document with versions. Files are stored in tenant-scoped storage. Returns one document with its `ETag`. A document the caller may not see returns 404.

Update a document

PATCH/documents/{id}

A document with versions. Files are stored in tenant-scoped storage. Updates the fields sent; omitted fields are unchanged. Requires `If-Match` with the current `ETag`: a stale tag returns 412 and a missing tag returns 428.

Delete a document

DELETE/documents/{id}

A document with versions. Files are stored in tenant-scoped storage. Soft-deletes the document: it moves to Trash and can be restored for its table's retention period.