Skip to main content
Koru
Get started
API reference sections

Schema

NewDocument

POST /v1/workspaces/{id}/documents.

Type object

Shape

FieldTypeDescription
idDocumentId or null

Optional client-minted identity. Importers use this so snapshots can contain routed references to other entries in the same batch.

Default null

titlerequiredstring
kindrequiredstring

The application's own kind - page, task-list. A stable token, and the store never interprets it.

mimestring or null

MIME type for file entries. Optional for ordinary documents and older clients.

parentDocumentId or null

Absent means the workspace root.

Default null

indexinteger (uint, >= 0) or null

Where among parent's children it goes. Absent means the end, which is what every caller with no opinion sends and what an older client's body decodes as.

The same coordinate MoveDocument uses - an index among siblings, counting the trashed ones, because that is what the manifest tree holds. Past the end is clamped rather than refused: a new page below the last one is an ordinary request, not an arithmetic mistake.

Default null

trashed_atTimestamp or null

Create the manifest row already in Trash at this source timestamp. Absent preserves the pre-capability behavior for older clients.

snapshotarray of integer (uint8, >= 0, <= 255) or null

Optional complete initial state. Used by importers so registering the manifest row and committing content is one Store operation rather than a briefly visible empty page followed by a client update.

Example
{
  "id": "00000000-0000-4000-8000-000000000000",
  "title": "string",
  "kind": "string",
  "mime": "string",
  "parent": "00000000-0000-4000-8000-000000000000",
  "index": 0,
  "trashed_at": 0,
  "snapshot": [
    0
  ]
}

The contract has no example values, so example bodies are generated from each schema: every field is shown with a placeholder of its type.

Used by

Generated from contract version 1. Last updated .

Privacy choices

Choose which optional tools Koru may use on this site. Your choice is saved in a cookie in this browser for 12 months. Privacy policy

Privacy choices

Keep you signed in, protect forms and remember your language and this choice.

Always on

PostHog and Google Analytics 4 measure page views and actions such as downloads, using cookies or local storage.

PostHog records how pages are used, with form inputs masked and private pages excluded. Needs Analytics.

Ahrefs Web Analytics measures visits and where they come from, and Google Ads measures whether our ads led to a visit or download.