Inkling
All docs

Integrating

Inkling API Contract (M1)

The REST contract shared by the web app, scripts and the MCP tools.

Rendered from docs/API.md in the repository. Markdown source

The shared contract between the server and web agents. This document is the source of truth: implementations must not diverge from it. Request validation schemas and DTO types are defined in @inkling/shared (packages/shared/src/index.ts), and both sides import them. 한국어: API.ko.md.

Common rules

Localization

Auth

MethodPathBodyResponse
GET/api/auth/mode-AuthModeDTO { delegated, delegatedName, delegatedEmailDomain, signupKeyRequired, mailEnabled, emailVerificationRequired, defaultLocale } (no auth required). defaultLocale: 'en' | 'ko' | null is set only when the operator configured DEFAULT_LOCALE (otherwise null, and the browser language decides). Restricted mode (0.22) adds optional fields, each only when its setting is on: v0.22.0 additions
POST/api/auth/registerregisterSchema{ user: UserDTO } + Set-Cookie. Email is normalized to lowercase. Duplicate → 409 EMAIL_TAKEN. Sign-up automatically creates a personal workspace named after the user (the user is its owner; name in the request locale). If there are no admins yet, this user becomes the admin (bootstrap). Mail enabled → a verification email is sent. In enforced-verification mode there is no session: { user, verificationRequired: true, mailSent }. Email in the delegated domain → 400 EMAIL_RESERVED. Bad sign-up key → 403 INVALID_SIGNUP_KEY. Restricted mode (0.22): loginId instead of email, consent and bot-check fields, new errors (v0.22.0 additions).
POST/api/auth/loginloginSchema{ user: UserDTO } + Set-Cookie. Failure → 401 INVALID_CREDENTIALS (never reveal whether the email exists; same message). Unverified account in enforced-verification mode (only when the password is correct) → 403 EMAIL_NOT_VERIFIED. If there are no admins, bootstrap promotion applies.
POST/api/auth/login/totp{ challenge, code }Second step for accounts with two-step verification: POST /api/auth/login then returns 200 { totpRequired: true, challenge } without a cookie. code is a 6-digit app code or a recovery code. { user: UserDTO, recoveryCodeUsed } + Set-Cookie. 401 INVALID_TOTP_CODE / TOTP_CODE_REUSED / TOTP_CHALLENGE_EXPIRED (5 minutes or 5 failures). 10/min (docs/adr/1061-*)
GET/api/auth/2fa-{ enabled, pending, recoveryCodesLeft, available }. Browser session, local accounts only (also for the other /auth/2fa* routes).
POST/api/auth/2fa/setup{ password }{ secret, uri } (otpauth://). 409 TWO_FACTOR_ALREADY_ON, 501 TWO_FACTOR_UNAVAILABLE without APP_SECRET_KEY.
POST/api/auth/2fa/enable{ code }{ recoveryCodes } (10, shown once).
POST/api/auth/2fa/disable{ password, code }{ ok: true }
POST/api/auth/2fa/recovery-codes{ password, code }{ recoveryCodes } (replaces the old set).
POST/api/auth/logout-204 + cookie cleared. The session row is deleted.
GET/api/auth/me-{ user: UserDTO } / 401. Includes origin, emailVerified (true for delegated accounts), locale: 'en' | 'ko' | null (saved UI/email language; null = automatic), twoFactor (two-step verification on), sidebar: SidebarPrefsDTO (sidebar menu order / hidden menus, see Sidebar menus; { order: [], hidden: [] } when never customized), and pendingResetRequests for admins. Restricted mode (0.22) adds expiresAt and consentRequired when they apply.
PATCH/api/auth/me/locale{ "locale": "en" | "ko" | null }{ "locale": "en" | "ko" | null }. Requires a session. Saves the account's UI and email language (null = automatic: browser language / DEFAULT_LOCALE). Anything else → 400 VALIDATION.
POST/api/auth/reset-passwordresetPasswordSchema { email, code, newPassword }{ ok: true }. Code = a reset code from an admin or automatic email (single use, 24h), or the maxUses=1 sign-up key that person registered with. On success all of that account's sessions are deleted, remaining codes are revoked and pending requests are resolved. Failure (unknown account, delegated account, wrong code alike) → 400 INVALID_RESET with the same message. 10/min + blocking on accumulated failures.
POST/api/auth/forgot-passwordforgotPasswordSchema { email, note? }Always { ok: true } (never reveal whether the account exists). Only existing accounts are processed: verified email + mail enabled → a reset code email is sent automatically (in the background, at most one per 5 minutes). Otherwise (unverified, mail disabled, delegated account) → merged into a single pending row in password_reset_requests (refreshed at most once a minute). Input without @ is treated as a delegated ID. 5/min.
POST/api/auth/change-passwordchangePasswordSchema { currentPassword, newPassword }{ ok: true }. Cookie sessions only (bearer → 403). Delegated account → 400 DELEGATED_ACCOUNT. Wrong current password → 400 INVALID_PASSWORD. All other sessions are deleted; only the current one remains.
POST/api/auth/verify-email{ token }{ ok: true, email }. Token is single use, 24h, and the email at send time must equal the account's email. Invalid → 400 INVALID_TOKEN.
POST/api/auth/verify-email/send(cookie session) or { email, password }{ ok: true, alreadyVerified? }. Resend the verification email. Mail disabled → 501 MAIL_DISABLED. One per minute (429).

Which top-of-sidebar menus a person shows and in what order, stored on the account (users.sidebar_prefs, migration 0033) so every device matches. Browser sessions only: no cookie → 401, an agent's bearer token → 403.

MethodPathBodyResponse
GET/api/me/sidebar–SidebarPrefsDTO { order: string[], hidden: string[] }; { order: [], hidden: [] } when never customized (also returned as user.sidebar by GET /api/auth/me).
PUT/api/me/sidebarsidebarPrefsSchema { order, hidden }The stored value. Replaces the whole value; both lists empty = back to the default (stored as NULL). Ids match ^[a-z][a-z0-9-]{0,31}$, at most 32 per list, duplicates dropped (first kept); anything else → 400 VALIDATION and nothing changes.
MethodPathBodyResponse
DELETE/api/admin/users/:id/2fa-{ ok, wasOn }. Turns off the member's two-step verification and signs out their sessions. GET /api/admin/users rows carry twoFactor.
GET/api/admin/signup-keys-{ keys: SignupKeyDTO[] } newest first, including the users who signed up with each key. SignupKeyDTO.id is the key hash; key is the raw key only while it can still be revealed (unused and sealed), else null; keyHint shows the last characters (docs/adr/1110-*)
POST/api/admin/signup-keyscreateSignupKeySchema{ key: SignupKeyDTO }
DELETE/api/admin/signup-keys/:key-{ ok: true } (accounts that signed up with it are kept)
POST/api/admin/signup-keys/:key/send-invite{ to }{ ok: true } invite email (/register?key=). :key here and in DELETE is the id or the raw key; a key that can no longer be revealed 409 KEY_NOT_REVEALABLE. Mail disabled 501, failure 502 MAIL_FAILED. 20/min
GET/api/admin/users-{ users: AdminUserDTO[] } newest sign-ups first. Includes signupKeyRecovery (holds a single-use sign-up key) and emailVerifiedAt
PATCH/api/admin/users/:idsetAdminSchema{ user: { id, isAdmin } }. Revoking yourself or the last admin → 400
DELETE/api/admin/users/:id-{ ok: true } forced account deletion. Content is kept via SET NULL, sessions and memberships cascade, the sign-up key's used_count −1 (floor 0). Yourself or the last admin → 400
POST/api/admin/users/:id/temp-password-{ password } (shown once). Deletes all of that user's sessions, resolves pending requests. Delegated account 400 DELEGATED_ACCOUNT, yourself 400
POST/api/admin/users/:id/reset-code-{ code, expiresAt } (shown once, 24h, only SHA-256 stored in the DB). Revokes previous codes, deletes all sessions, resolves pending requests. Delegated account or yourself 400
POST/api/admin/users/:id/send-credentialsendCredentialMailSchema { to, kind: 'reset-code'|'temp-password', secret }{ ok: true }. Sent only after the server confirms the secret is currently valid for that user. 20/min
POST/api/admin/users/:id/send-verification-{ ok: true } verification email to the account's email. Already verified 400
POST/api/admin/users/:id/verify{ verified?: boolean }{ user: { id, emailVerifiedAt } } manually mark as verified (false unmarks)
GET/api/admin/reset-requests-{ requests: ResetRequestDTO[] } newest 200
POST/api/admin/reset-requests/:id/dismiss-{ ok: true } pending → dismissed. Missing or already handled 404
GET/api/admin/ip-bans-IpBansResponseDTO { bans, yourIp, yourIpAllowlisted, allowlist, policy }
POST/api/admin/ip-bansmanualBanSchema { ip, minutes, reason? }{ ok, ip, bannedUntil }. Allowlisted IP or your own IP → 400
DELETE/api/admin/ip-bans/:id-{ ok: true } lifts the active ban on that IP (the escalation level is kept)

Workspaces

MethodPathBodyResponse
GET/api/workspaces-{ workspaces: WorkspaceDTO[] } (those you are a member of, including role and can, docs/adr/0945-). An MCP connection blocked in a workspace does not see it (docs/adr/0947-). inviteCode is '' unless you are an owner, or an admin while the invite link is on
POST/api/workspacescreateWorkspaceSchema{ workspace: WorkspaceDTO } (invite code generated automatically, you are the owner)
POST/api/workspaces/joinjoinWorkspaceSchema{ workspace: WorkspaceDTO }. Codes are compared after uppercase normalization. Unknown code, or the invite link turned off → 404 INVALID_CODE. Already a member → plain 200 (idempotent). Audited as member.joined.
GET/api/workspaces/:id/members-{ members: MemberDTO[] }
PATCH/api/workspaces/:idrenameWorkspaceSchema { name?, icon? } (icon ≤ 16 chars, null clears; at least one field){ workspace: WorkspaceDTO }: owner only (otherwise 403). Audited as workspace.updated

Pages

MethodPathBodyResponse
GET/api/workspaces/:id/pages-{ pages: PageMetaDTO[] }: only deleted_at IS NULL, sorted sortOrder asc, createdAt asc. The client assembles the tree from parentId.
POST/api/pagescreatePageSchema{ page: PageMetaDTO }. If parentId is given it must be a live page in the same workspace (otherwise 400 VALIDATION). sortOrder = max among siblings + 1000.
PATCH/api/pages/:idupdatePageSchema{ page: PageMetaDTO }. When parentId changes: same workspace, not itself, not into its own descendants (cycle prevention via a parent-chain check). Updates updatedAt.
DELETE/api/pages/:id-204. Soft delete: sets deleted_at on the page and all its descendants (recursive CTE).

Files

MethodPathInputResponse
POST/api/files?workspaceId=<uuid>&pageId=<uuid>multipart field file (one){ file: FileDTO }: url is /files/<id>. pageId is required for bearer tokens since 0.16 (see "v0.16.0 additions")
GET/files/:id-Binary stream. Headers: Content-Type from the row's mime, Content-Disposition: inline; filename*=UTF-8''<encoded> for raster images and attachment; … for every other type (PDF, text, video, audio), X-Content-Type-Options: nosniff, Content-Security-Policy: default-src 'none'; sandbox, Cache-Control: private, max-age=31536000, immutable, ETag=id. Unauthenticated 401; not a member or guest of the file's workspace, or a page file you cannot see: 404, the same as an unknown id (docs/adr/1301-*).

Collab (real-time co-editing)

Misc


M2 additional contract (Markdown round-trip · wiki links · trash · search)

Pages additions

MethodPathResponse
GET/api/pages/:id/backlinks{ pages: PageMetaDTO[], sections? }: live pages that link to this page (membership checked, updatedAt desc). sections (0.17, only when a source has section links): see "v0.17.0 additions"
POST/api/pages/:id/restore{ page }: sets deleted_at=null on the page and its descendants. If the parent is still deleted, parentId=null (moved to the root). 400 if the target is not deleted
DELETE/api/pages/:id/purge204: hard delete (cascade). Allowed only for deleted (trashed) pages, otherwise 400
GET/api/workspaces/:id/trash{ pages: PageMetaDTO[] }: all deleted pages (flat), deletedAt desc
GET/api/workspaces/:id/search?q={ pages: PageMetaDTO[] }: title ILIKE substring match (escaped), live pages only, limit 20, updatedAt desc. Empty q → empty array

Export / Import

MethodPathInput/Output
GET/api/pages/:id/export?format=mdtext/markdown; charset=utf-8 attachment (single page, children excluded). Image links keep their absolute /files/... paths. notation=plain (default) | agent | file (0.17, see "v0.17.0 additions")
GET/api/pages/:id/export?format=zipzip: the page + its subtree. Structure follows the convention below. Pages are written with notation=file unless notation=plain (0.17)
GET/api/workspaces/:id/exportzip: the whole workspace tree, notation=file unless ?notation=plain (0.17)
POST/api/workspaces/:id/import?parentId=<uuid?>&source=<auto|markdown|notion?>multipart file = a single .md or a .zip (≤ IMPORT_MAX_UPLOAD_MB, default 25). Response { pages: PageMetaDTO[] } (created pages, in creation order). A Notion export (source=notion, or a zip detected as one when source is omitted) responds { pages, report }, see Notion export import. source=notion with a non-zip file → 415

zip convention (Obsidian-friendly)

assets/                  ← all images and files (file name: <fileId><extension inferred from mime>)
Page Title.md
Page Title/              ← a page with children gets a folder of the same name (alongside the file)
  Child Title.md

Notion export import

Notion → Settings → Export (or a page's ⋯ → Export) → Markdown & CSV, include subpages, create folders for subpages; upload the downloaded zip as is (docs/adr/0960-*).

report:

{ source: 'notion', detected: 'explicit' | 'auto',
  pages, documents, folders, collections, rows, attachments: number,
  links: { total, resolved },             // relative links, attachment paths, notion.so URLs
  brokenLinks: { page, href }[], brokenLinkCount,   // lists capped at 200, counts exact
  skipped: { path, reason }[], skippedCount,         // view CSVs, unreferenced attachments, …
  renamed, callouts, equations: number }

Page kinds (kind) — M2


M3 contract — Collections (Notion-style databases)

Types and validation schemas come from the M3 section of @inkling/shared (collectionFieldSchema, viewConfigSchema, updateFieldsSchema, createViewSchema, updateViewSchema, updatePropsSchema, CollectionDTO, CollectionViewDTO, RowDTO).

Model

Endpoints

MethodPathBodyResponse
POST/api/pages (kind='collection')existing createPageSchemaOn creation the server automatically creates: a collections row (default fields: Status (select: To do (gray) / In progress (blue) / Done (green)), Assignee (person), Due (date)) + a default table view ("Table"). Names follow the request locale
GET/api/pages/:id/collection-{ collection: CollectionDTO, rows: RowDTO[] }: 400 if the target is not of kind collection. rows are live children (sortOrder asc), with props
PUT/api/pages/:id/collection/fieldsupdateFieldsSchema{ collection }: full replacement. Duplicate field id → 400. Orphan values of deleted select options are not cleaned up (ignored when rendering)
POST/api/pages/:id/collection/viewscreateViewSchema{ view } (sortOrder = max+1000)
PATCH/api/collection-views/:idupdateViewSchema{ view }: config is fully replaced (not merged)
DELETE/api/collection-views/:id-204. 400 VALIDATION if it is the collection's last remaining view
PATCH/api/pages/:id/propsupdatePropsSchema{ row: RowDTO }: merge; a null value deletes the key. Allowed even if the target page's parent is not a collection (properties are just stored)

M8 contract — Invite links · member management · version history

Invites

Members (roles owner | admin | member, docs/adr/0945-*)

Workspace deletion (owner, soft delete with a 30-day restore — docs/adr/0910-*)

Snapshots (version history, doc pages, visibleTo guard)

M9 contract — Calendar view · daily notes · templates

Calendar view

Daily notes

Page duplication (templates: see Templates)


MCP remote connector + OAuth 2.1

User guide: MCP.md. Claude Code / claude.ai connect to https://<domain>/mcp, and once each user allows it on the browser consent screen, notes are read and written with that user's permissions only.

Endpoints (root, not /api; CORS *; no cookies)

MethodPathDescription
GET/.well-known/oauth-protected-resource (same with a /mcp suffix)RFC 9728. resource=<origin>/mcp, authorization_servers=[<origin>]
GET/.well-known/oauth-authorization-serverRFC 8414. code + S256 + token_endpoint_auth_methods=["none"]
POST/oauth/registerRFC 7591 DCR (public clients). redirect_uris must be https or `http://localhost
GET/oauth/authorizeNo server route: the SPA consent screen (OAuthAuthorize.tsx). Goes through /login?next= when not signed in
POST/oauth/tokenform-urlencoded (JSON also accepted). authorization_code (code single use, 5 minutes, PKCE S256, redirect_uri must match) / refresh_token (rotating; reusing a previous refresh token revokes the whole connection). Access 1 hour, refresh 60 days (sliding). Errors are RFC 6749 {error,error_description}
POST/mcpMCP Streamable HTTP (stateless, JSON responses). Missing/invalid token → 401 + WWW-Authenticate: Bearer resource_metadata="<origin>/.well-known/oauth-protected-resource/mcp". GET/DELETE → 405
MethodPathDescription
GET/api/oauth/authorize/info?client_id&redirect_uri{ client:{id,name}, redirectHost }. Unregistered client / redirect mismatch → 400 (no redirect)
POST/api/oauth/authorizebody = the authorize query + `decision: allow
GET/api/oauth/grantsConnected apps { grants: [{id, clientName, createdAt, lastUsedAt}] }
DELETE/api/oauth/grants/:id204. Access and refresh tokens are invalidated immediately

Token → permissions

Tools

Read: find_context(query?, queries?, workspaceId?, budget?) (one of query / queries), read_page(pageId, outline?, section?, maxChars?), read_pages(pageIds[], budget?), list_workspaces, list_pages(workspaceId, parentId?|'root', depth?, format?), search(query, workspaceId?, format?), changes_since(cursor?, workspaceId?, budget?, detail?), query_rows(collectionId, filter?, sort?, fields?, limit?, cursor?, describe?), list_templates, get_instructions(workspaceId, forPageId?) (docs/adr/0975-). Text outputs wrap member-written content in <untrusted_content …> and print can: / applies: / suspicious: lines (docs/adr/0976-, 0977-). Write (refused for read-only tokens): patch_section(pageId, section, markdown?, mode, baseVersion?), update_page(pageId, markdown, mode: append|replace), create_page(workspaceId, title, markdown, parentId?, private?), import_folder, update_row(rowId, properties, baseVersion), create_row(collectionId, title?, properties?), rename_page, move_page(pageId, parentId|null, section?) (within the same workspace only), trash_page (soft delete), add_comment(pageId, body) (anchored to the first block), create_from_template. list_pages and search keep their legacy JSON unless format: "lines" or "compact" (docs/adr/0928-, 1541-). JSON answers clean member-written strings and add a trailing untrusted key (objects) or a second text block (arrays) (docs/adr/1525-). Tools added later: see "v0.12.0 additions", "v0.13.0 additions", "v0.14.0 additions" and "v0.15.0 additions" below and MCP.md.

MethodPathBodyResponse
POST/api/pages/:id/content`{ markdown, mode: 'replace''append' }`

Agent retrieval and section editing (docs/adr/0926–0930)

Session cookie or MCP bearer (internal inject). Token numbers are estimates (ADR 0926).

MethodPathRequestResponse
GET/api/contextq (1–300 chars; may repeat: up to 5 different values after normalising, ADR 1720), workspaceId? (else every live workspace I belong to), budget? (≤ 12,000, default 3,500){ fragments: [{pageId, workspaceId, title, anchor, headingPath, sections: [{anchor, headingPath, version}], ords, text, tokens, score, truncated}], more: [{pageId, title, anchor, headingPath, tokens}], titleOnly: [{pageId, title, kind}], budget, usedTokens, candidates }. Only live, visible pages of live workspaces. With 2+ different q: also queries: string[] and fragments[].matched: string[] (query numbers "1".."5"); one budget for all; each section once. While semantic search is on, one q is merged too (v0.14.0 additions)
GET/api/pages/:id/outline–{ page: {id, title, kind, workspaceId, updatedAt}, sections: [{anchor, headingPath, level, tokens, version}], tokens } (non-doc pages: empty sections; tokens is the sum of the section's index parts; answered from the section index while it is current, docs/adr/1041-*)
GET/api/pages/:id/sectionref (anchor, heading text, heading path or heading block id), maxChars?{ page, section: {anchor, headingPath, level, version}, markdown, truncated, totalChars }; unknown ref → 404 SECTION_NOT_FOUND listing valid anchors
GET/api/pages/readids (comma-separated, ≤ 20), budget? (≤ 30,000, default 8,000){ pages: [{id, title, workspaceId, kind, updatedAt, markdown, tokens, truncated}], omitted: [{id, title, reason}], missing: [id], budget, usedTokens }; invisible ids are only listed in missing
POST/api/pages/:id/section{ ref, markdown, mode: replace|append|prepend|insert_after|delete, baseVersion? }{ ok, section: {anchor, headingPath, version} | null, sections }. Doc pages only. Version mismatch → 409 SECTION_CONFLICT with error.current {anchor, headingPath, version, markdown}, nothing written. replace/delete take a "Before AI edit" snapshot (≤ 1 per page per 2 min). 30/min

Collection queries for agents (docs/adr/0934-*)

MethodPathDescription
GET/api/pages/:id/collection/queryRows of a collection filtered/sorted/paged in SQL. Query: filter (compact syntax, see ADR 0934), sort ("Due desc, Title"), fields (JSON array or comma list, * = all), limit (1–200, default 25), cursor (opaque nextCursor), describe=1 (schema only, adds definitions). Returns {collection, workspaceId, fields, columns, rows: [{id, version, cells}], nextCursor}. 400 INVALID_QUERY / QUERY_TIMEOUT.
GET/api/pages/:id/rowOne collection row: {collection, workspaceId, fields (definitions), columns, row: {id, title, version, cells}}. 400 NOT_A_ROW for a page that is not a collection row.
PATCH/api/pages/:id/props(addition) optional baseVersion (row version from the two routes above). Mismatch → 409 ROW_VERSION_CONFLICT with currentVersion, nothing written. When baseVersion is sent the response also has version.

Edit lock and agent instructions (docs/adr/0970–0978)

Nothing is locked by default. A lock on a page covers its subtree; the nearest locked ancestor governs. Writes by a member who may not edit return 403 PAGE_LOCKED with error.lockedPageId and error.editors [{id, name}] (the page owner first); the message names who can edit. Every write route of pages, collections, tasks, ink, snapshot restore, document owner/living, sheet sync and vault sync checks it; creation under a locked parent, moves into or out of a locked subtree and trash/restore/purge of a subtree that holds a lock the caller cannot edit are refused as well. Comments check a separate permission (people may always comment; a lock can take commenting away from agents). The collab socket of a member who may not edit is read-only (Hocuspocus authenticated scope readonly; updates are answered with SyncStatus false and dropped).

MethodPathBody / queryResponse
GET/api/pages/:id/lock–PageLockDTO { pageId, locked, own, lockRoot {id,title}|null, owner, editors, people: editors|everyone|null, agents: same|comment|read|null, canEdit, canComment, canManage, instructions } for the caller (an MCP request is evaluated as an agent)
PUT/api/pages/:id/lock{ locked, people?, agents?, editorIds? }PageLockDTO. Browser session only (bearer → 403). Owners/admins, or the page owner while they can edit it. Private pages → 400. Audited: page.locked, page.unlocked, page.lock_editors_changed. Unlocking removes an instruction designation (instructions.removed). Live sockets of the subtree are closed so clients re-authenticate
PUT/api/pages/:id/agent-instructions{ mode: always|match|manual, applyTo?: ["page:<id>" | "Title/**"], description?, sortOrder? }PageLockDTO. Owners/admins, browser only. Shared doc pages only; locks the page if needed; match needs a non-empty applyTo. Audited instructions.set
DELETE/api/pages/:id/agent-instructions–PageLockDTO (designation removed, lock kept)
GET/api/workspaces/:id/agent-instructions–{ instructions: AgentInstructionDTO[] } (live, locked, shared doc pages only)
GET/api/workspaces/:id/agent-instructions/bundleforPageId?{ workspaceId, forPageId, always: [..dto, markdown, truncated], matching: [...], otherMatch, manual, version } (MCP get_instructions)
GET/api/pages/agent-contextids (≤ 50), read=1?{ pages: [{id, can: "read,comment,edit", createdBy, lastEdit {name, via}|null, large, suspicious: [{anchor, rules}]}], applies: [{pageId, title, mode}] } (large: state ≥ 1 MiB or ≥ 50k indexed tokens, docs/adr/1043-). MCP tools compute the same object in process instead of calling this route (docs/adr/1070-); read=1 records oauth_grants.tainted_at when flagged content is returned to an agent
GET/api/pages/:id/suspicious–SuspiciousSectionsDTO { pageId, sections: [{anchor, headingPath, rules}] } — injection-like heuristics stored at index time (page_chunks.suspicious); a signal only

PageMetaDTO.editLocked?: true marks pages that carry their own lock. New audit actions: page.locked, page.unlocked, page.lock_editors_changed, instructions.set, instructions.removed, content.suspicious (first detection per page and rule, no actor).

OAuth: POST /oauth/register refuses a client_name that folds to a reserved word (Inkling, Admin, System, public form, …; 400 invalid_client_metadata); POST /api/oauth/authorize refuses the same reserved words (400 CLIENT_NAME_RESERVED). A client named exactly like another member is refused per workspace at request time (403 CLIENT_NAME_CLASH, only in workspaces where that member is; common app names such as Claude are exempt), and GET /api/oauth/authorize/info adds nameNotice: { member, workspaces[], blocking } | null for the consent screen (docs/adr/1007-*).

Access changes wait for writes in progress (docs/adr/1071-*): PUT /pages/:id/lock, PUT|DELETE /pages/:id/agent-instructions, POST|DELETE /workspaces/:id/agents/blocks, PUT /pages/:id/owner, role changes, member removal and a PATCH /pages/:id that changes parentId take the workspace access row exclusively; transactional writes in the same workspace hold it shared (lock_timeout 10 s). The next request after such a change sees the new rules.

Provenance (docs/adr/0936-*)

Change feed (docs/adr/0932-, 0933-)

MethodPathDescription
GET/api/changes?cursor&workspaceId&budget&detailChanges since a cursor (net per-section diffs within a token budget; detail = none | diff (default) | full). No cursor → current cursor. Returns { status: 'start'|'ok'|'resync_required', cursor, text, changes, detailed, listedOnly, rows, more }. 400 INVALID_CURSOR / CURSOR_WORKSPACE; workspaceId → membership required. Only pages visible at change time are reported; pages no longer visible appear as removed (no longer visible) without content. Rows are kept CHANGE_FEED_RETENTION_DAYS (default 30)

Since 0.15.1 an anchor that passes from one heading to another is logged as a rename, not a modification: a ## Decided inserted above another ## Decided gives renamed decided>decided~2 + added decided (before: modified decided + added decided~2); the text reads renamed decided → decided~2 (docs/adr/1960-*, "v0.15.1 additions" below).

Notifications, subscriptions, activity and the agent inbox (docs/adr/1000–1007)

Notification rows are written by a background queue after the write that caused them (comments, body @mentions, document owner, person cells, followed-page edits). NotificationDTO adds via, count (collapsed repeats), excerpt (≤ 200 plain characters), anchor and quiet (listed without a badge: agent-written mentions and level nothing). The unread count ignores quiet rows. New types: comment_reply, page_owner, task_assigned, page_update, agent_digest, reserved approval_request (passes mute) and approval_result; doc_mention is now produced.

MethodPathBody / queryResponse
GET/api/me/notification-settings–NotificationSettingsDTO { emailInstant, emailDigest: 'off'|'daily'|'weekly', mailAvailable, subscriptions: SubscriptionDTO[] } (session cookie only)
PATCH/api/me/notification-settings{ emailInstant?, emailDigest? }same DTO; turning a channel off drops what was waiting for it
GET/api/pages/:id/subscription–PageSubscriptionDTO { own, effective: {level, source: page|ancestor|workspace|default, fromPageId, fromTitle}, agentDigest, implicit } (session only)
PUT/api/pages/:id/subscription{ level: 'all'|'mentions'|'nothing'|'mute'|null, subtree?, agentDigest? }same; level: null removes my row (inherit). "Follow" = all
GET / PUT/api/workspaces/:id/notification-levelPUT { level, agentDigest? }{ level, agentDigest, isDefault } — my default for the workspace (session only)
GET/api/workspaces/:id/activitybefore, limit (≤100), actor=any|human|ai, via, userId, rootId, kind=any|edit|page, aiPagesOnly=1ActivityPageDTO { items: ActivityItemDTO[], next, clients } newest first; rows of other people's private pages are never listed, titles only for pages visible now
GET/api/changes/:seq/diff–ChangeDiffDTO { before, after, ops: [{t:'='|'-'|'+', s}] | null, large, … }; 404 unless the page is visible now and the row was visible when logged; also 404 when you are not a member of the workspace (docs/adr/1301-*)
GET/api/pages/:id/snapshots/:sid/diffagainst=current|<snapshot id>SnapshotDiffDTO { from, to, ops, large } (Markdown of both versions, line diff)
GET/api/pages/:id/provenance–PageProvenanceDTO { createdVia, createdByName, lastAgentEdit: {at, via, actorName} | null }
GET/api/inboxworkspaceId?, cursor?, kinds=mention,reply,comment,assigned,…{ items: InboxItem[], more, unacked } — unacknowledged direct items of the caller in seq order (MCP inbox)
POST/api/inbox/ack{ ids?: string[], cursor?: string, workspaceId?: uuid, kinds?: InboxKind[] }{ acked } — sets acked_at; does not touch read. ids: exactly those items. cursor: the items up to it that GET /api/inbox with the same workspaceId/kinds lists (visibility, range, membership, agent access and the two-step rule included); without them, the unfiltered inbox (docs/adr/1922-*)

PATCH /api/comments/:id with resolved from an agent (bearer) request: 403 AGENT_RESOLVE_NOT_ALLOWED unless the thread root was written by the token's user. PageMetaDTOs are unchanged; pages.created_via is set for pages created through MCP (POST /api/pages, import, import-folder, from-template). Webhook events add assigned and agent_digest (daily). Mail needs SMTP; links use APP_URL/PUBLIC_URL; NOTIFY_MAIL_DELAY_MS (default 120000) delays instant mail so a burst becomes one message and reading in the app first cancels it.

Public folder sharing (2026-09-23)

Shares a folder (kind='folder') through a single public link: anyone with the link can browse and read the folder's current subtree without signing in. Publish/stop rules are the same as single-page sharing (workspace owner only; scope='private' → 400). Existing single-page sharing behavior is unchanged.

MethodPathResponse
GET/api/pages/:id/share · same for POSTShareStatusDTO + for folders exposedCount (number of currently viewable doc/collection descendants, excluding the folder itself)
GET/api/public/:token (folder token)PublicFolderDTO { kind:'folder', title, icon, tree: PublicTreeNodeDTO[], updatedAt }. Node = { ref, title, icon, kind, children }. Collection rows are hidden from the tree (same as the app sidebar). A single-page token returns the existing PublicPageDTO (no kind field)
GET/api/public/:token/p/:refBody of a descendant doc/collection as PublicPageDTO (server-rendered HTML). folder/canvas ref → 404. Wiki links: targets inside the subtree → /s/<token>/p/<ref> (the root folder → /s/<token>), outside → plain text. Attachment URLs → the path below
GET/api/public/:token/p/:ref/f/:fileIdOnly files referenced by that descendant page's blocks/cover/icon (same workspace). A fileId from another page → 404
GET/api/public/:token/f/:fileIdExisting route. For a folder token, only the folder's own icon/cover

Common to public routes: 60/min per route, Content-Security-Policy: default-src 'none'… + nosniff, bodies Cache-Control: no-store, files public, max-age=300. Web: /s/:token (tree + reading pane for folders), /s/:token/p/:ref. "Share to web" in the tree row ⋯/right-click menu (doc, collection, folder; shared section only).

Calendar · due dates completed — tasks inside documents (2026-09-23)

To fill the calendar and due list for users who only write regular documents, checklists inside documents are pulled in as dated items.

Task index (page_tasks, migration 0020_page_tasks, additive only)

Dated items (md/dateItems.ts → DateItemDTO)

{ kind: 'row'|'page'|'daily'|'task', pageId, title, icon, date, done, collectionTitle?, fieldId?, doneFieldId?, blockId?, parentPath?, pageTitle? }

MethodPathDescription
GET/api/workspaces/:id/calendar?month=YYYY-MM or ?from=&to= (≤62 days){ events: CalendarEventDTO[] } = DateItemDTO + a legacy-compatible type (=kind). For rows, every date field is its own item
GET/api/workspaces/:id/dueDueResponseDTO { today, items: (DateItemDTO & {section})[], counts }. Sections: overdue (not done, last 60 days), today, tomorrow, week (the rest of the 7 days), next30, done (done + dated from 7 days ago to 30 days ahead). row/page/task only (daily excluded). One per row: the value of a date field named `마감
PATCH/api/pages/:id/tasks/:blockId{ checked?, due? } → toggle done / change the date of one checklist item inside a document. { ok, task }. 120/min. 404 = no such block, 400 = no date token or validation failed
POST/api/workspaces/:id/tasks{ title, date } → appends - [ ] title 📅 date to the end of the workspace's Tasks document (top level of the shared section, created if missing (an advisory lock guarantees only one); its title follows the request locale), then reindexes immediately. { ok, pageId, blockId }. 60/min
POST/api/pagesexisting + date?: 'YYYY-MM-DD' → creates a doc with a date property ({id:'date', name:<"Date", localized>, type:'date'})
PATCH/api/pages/:idexisting + `dateProperty?: { id?, value: 'YYYY-MM-DD'

Safe document-write paths: only the PATCH tasks / POST tasks routes above write documents (explicit user actions).

Reminders: the hourly scan adds "pages with an unfinished task due today → the page's author (if a workspace member)". Same once-a-day-per-page dedupe as row reminders, per-page error isolation.

Web: calendar month/week view (prefs calendar.view), kind filter and show-done toggle (doubling as the legend), clicking an empty date / Enter on the day number → popover (add a task · ⌘/Ctrl+Enter new page on this date · open/create the daily note; a bottom sheet on phones), chip drag (rows/pages/tasks, not dailies; MouseSensor 5px, TouchSensor 250ms), clicking a task chip → ?block=<id> scrolls to and highlights the block. Due list: sections, counts, checking (optimistic + undo toast), source, relative dates, quick add at the top, sidebar badge (overdue + today, red when anything is overdue).

Plugins (experimental)

Registered only with EXPERIMENTAL_FEATURES=plugins (otherwise 404). GET /api/auth/mode gains experimental: string[] (enabled experiment names). Design: PLUGINS.md, ADR 0400–0405.

MethodPathNotes
GET/api/admin/pluginsAdmin (cookie). Fresh scan of PLUGINS_DIR merged with approvals: { pluginsDir, appVersion, plugins: [{ id, status: 'invalid'|'missing'|'not-approved'|'needs-reapproval'|'enabled'|'disabled', error, manifest, hash, install }] }
POST/api/admin/plugins/:id/approveAdmin. { hash, permissions: string[] } → enables exactly that content hash with permissions ∩ manifest.permissions. 409 PLUGIN_CHANGED if files changed since hash was read, 400 for unrequested permissions / invalid plugin
POST/api/admin/plugins/:id/disableAdmin. { ok }
DELETE/api/admin/plugins/:idAdmin. Forgets the approval and deletes every user's plugin_storage rows for it
GET/api/pluginsUser. Active plugins { plugins: [{ id, name, version, description, permissions, commands, blocks, frameUrl }] } (approved + enabled + on-disk hash unchanged)
GET/api/plugins/:id/pages/:pageIdread:pages. { page: { id, workspaceId, title, kind, updatedAt, markdown } } — same visibility/membership as the user; canvas/folder → 400. 120/min
GET/api/plugins/:id/search?workspaceId=&q=read:pages. Proxies /api/workspaces/:id/search as the user → { pages: [{ id, title, kind, updatedAt, snippet }] }. 120/min
POST/api/plugins/:id/pages/:pageId/contentwrite:pages. { markdown, mode: 'replace'|'append' } → proxies POST /api/pages/:id/content as the user (the web app asks the user to confirm first). 30/min
GET/api/plugins/:id/storagestorage. { keys } (this plugin, this user)
GET / PUT / DELETE/api/plugins/:id/storage/:keystorage. PUT { value } (JSON ≤ 64 KB; 500 keys / 1 MB per plugin per user → 413 PLUGIN_STORAGE_QUOTA); GET → { value | null }
GET/api/plugin-sdk/v1.jsUnauthenticated. In-frame SDK (text/javascript, nosniff)
GET/api/plugin-frame/:id/:hash/index.htmlUnauthenticated (opaque-origin frames send no cookies). 404 unless active with that exact hash. CSP default-src 'none'; script-src 'nonce-…'; connect-src 'none'; … frame-ancestors 'self'; sandbox allow-scripts, no-store
GET/api/plugin-frame/:id/:hash/main.jsUnauthenticated. The approved bundle bytes, immutable

Errors: unknown/inactive plugin → 404 PLUGIN_NOT_FOUND; missing permission → 403 PLUGIN_PERMISSION; MCP bearer tokens → 403 (browser sessions only).

Server-side fetches of user URLs go through safeFetch (SSRF guard, docs/adr/0500).

MethodPathNotes
GET/api/link-preview?url=Session required. 30/min per session. { preview: LinkPreviewDTO } (url final URL, title, description, siteName, image (https only), favicon (https only)). Unreachable, blocked or non-2xx → 422 PREVIEW_UNAVAILABLE (generic). Cached in memory 6 h (failures 10 min). Cache-Control: private, max-age=3600. docs/adr/0502
GET/s/:token, /s/:token/p/:refOnly when WEB_DIST is set. SPA shell with og:* / twitter:* meta + <title> for live shared (scope='shared') pages; otherwise the plain shell. 120/min/IP, no-store. docs/adr/0503
GET/api/workspaces/:id/webhooksOwner (or site admin member). { webhooks: WebhookDTO[] }, URL masked (urlMasked)
POST/api/workspaces/:id/webhooksOwner. { url, events: WebhookEvent[] } → { webhook }. url must be https://hooks.slack.com/services/… or `https://discord.com
PATCH/api/webhooks/:idOwner. { events?, enabled? } → { webhook }. Re-enabling resets failureCount and autoDisabledAt
DELETE/api/webhooks/:idOwner. 204
POST/api/webhooks/:id/testOwner. 5/min. Sends a fixed test message now → { ok, status, error, webhook }

WebhookEvent = mention (comment @mentions) · comment · reminder (due today) · page_created (shared section, sent after 20 s) · review_due (once a day: shared documents due for review by priority, docs/adr/0952-*). Webhook create/update/delete are audited (webhook.*, masked URL). Events on pages that are not scope='shared' are never sent. After 5 consecutive failed events a hook is disabled and owners get a webhook_disabled notification (NotificationDTO.workspaceId set). docs/adr/0504.

HTML responses without their own CSP get Content-Security-Policy: frame-src 'self' <embed providers> (docs/adr/0501).

Collections: relations, rollups, batch rows, gallery/timeline, Sheets sync, iCal

View types: table | board | calendar | gallery | timeline. ViewConfig adds cardCover (none|cover|firstImage), cardFieldIds, cardSize (sm|md|lg), startFieldId, endFieldId, zoom (day|week|month). Field types add relation (relation: { targetPageId, twoWay?, pairFieldId? }, value = string[] of row ids) and rollup (rollup: { relationFieldId, targetFieldId | 'title', fn }, fn = count|sum|avg|min|max|earliest|latest|percentChecked|showUnique, computed, never stored). Up to 200 fields per collection. docs/adr/0300, 0301.

MethodPathNotes
GET/api/pages/:id/collectionNow also returns refs: Record<rowId, RowRefDTO> (visible linked rows only). Relation cells contain only visible, live links; rollup values are injected into props. ?rows=0 → definition only (rows: [])
PUT/api/pages/:id/collection/fieldsValidates relation targets (visible collection in the same workspace) and rollups (relation of this collection; target may not be a rollup/relation except count) → 400 with a message. A new twoWay relation creates the paired field on the target collection (pairFieldId filled in)
PATCH/api/pages/:id/propsRollup keys are ignored. Relation values: invalid/hidden ids dropped, existing hidden links preserved, two-way pair mirrored
GET/api/pages/:id/collection/row-options?q=&limit=Relation picker: visible rows of the collection { rows: RowRefDTO[], more } (limit ≤ 200, default 50, title ILIKE)
GET/api/pages/:id/collection/coversGallery "first image": { covers: { rowId: '/files/<id>' } } (first uploaded image per visible row)
POST/api/pages/:id/collection/rows/batch{ rows: [{ title?, props? }] } 1–1000 rows, body ≤ 16 MB, one transaction. Values type-checked against fields; relation/rollup/unknown keys dropped. Collection cap 100 000 live rows → 400. → { rows: RowDTO[] }
PATCH/api/pages/:id/collection/rows/batch{ rows: [{ id, title?, props? }] } 1–1000. Merge like PATCH props (null deletes) in one SQL statement; only visible children of :id are touched → { updated }
GET / PUT / DELETE/api/pages/:id/collection/sheet-syncExperimental sheets-sync (404 when off). PUT { url, keyColumn, titleColumn?, intervalMinutes? (5–1440, default 15), enabled? }; url must start with https://docs.google.com/spreadsheets/. → { sync: SheetSyncDTO | null }. docs/adr/0306
POST/api/pages/:id/collection/sheet-sync/runExperimental. Sync now (6/min). Sheet errors → 400 with message; already running → 409 SYNC_RUNNING → { sync, stats: { inserted, updated, unchanged } }
GET/api/me/ical{ ical: { active, createdAt, lastUsedAt } } (never the token)
POST/api/me/icalIssue/regenerate → { ical: { …, url } } — the URL with the secret token is returned once
DELETE/api/me/icalRevoke. 204
GET/ical/<token>.icsRoot path, no session. RFC 5545 feed of every dated item the token owner can see (all workspaces, −90/+400 days). text/calendar, ETag + If-None-Match → 304, Cache-Control: private, max-age=300, 30/min/IP. Unknown token → 404. docs/adr/0303, 0304

Admin: backups

Admin + browser session only (MCP tokens → 403). Data comes from the backup sidecar through shared volumes (BACKUP_DIR, default /backups, read-only; BACKUP_CTL_DIR, default /backup-ctl). Restore has no HTTP endpoint (CLI deploy/restore.sh). docs/BACKUP.md, docs/adr/0600–0607.

MethodPathNotes
GET/api/admin/backups{ configured, status, alert, stale, pending, sets }. configured:false (everything else empty) when BACKUP_DIR does not exist. status = sidecar status.json (running, heartbeatAt, nextRunAt, lastSuccess, lastFailure, lastVerify, lastRestoreTest, remote, config …). alert = { kind, message, at } or null. pending = queued | processing | null. sets newest first: { id, kind, createdAt, totalBytes, encrypted, appVersion, migration, migrationsApplied, files[{ name, bytes }] }
POST/api/admin/backups/runQueue a backup now (6/min). 202 { queued: true }. 409 BACKUP_QUEUED / BACKUP_RUNNING / BACKUP_DISABLED / BACKUP_NOT_CONFIGURED, 503 BACKUP_SIDECAR_DOWN (no heartbeat for 10 min)
GET/api/admin/backups/:id/downloadStreams the set as an uncompressed application/x-tar (inkling-backup-<id>.tar), files as stored (encrypted sets stay encrypted). :id must match ^\d{8}-\d{6}$ → else 404 BACKUP_NOT_FOUND

NotificationType gains workspace_deleted (docs/adr/0910-*; pageId null, workspaceName set, not clickable) and backup_failed (sent to every admin when a backup, restore test or remote copy fails, or the sidecar stops reporting; no page/workspace).

Query blocks

Dataview-style queries (syntax: QUERY.md). docs/adr/0203, 0204.

MethodPathNotes
POST/api/workspaces/:id/query{ source, today?: 'YYYY-MM-DD', tzOffsetMinutes?: -840..840 } (member only, 120/min). → QueryResultDTO { type: 'TABLE'|'LIST'|'TASK', withoutId, columns: string[], rows: [{ pageId, title, cells: unknown[], task?: { blockId, text, due, checked } }], truncated, elapsedMs, cached? }. Only pages visible to the caller (shared + own private), no trashed pages or templates. Syntax / unknown field → 400 QUERY_SYNTAX (message ends with (line L, col C)); > 3 s → 400 QUERY_TIMEOUT. Rows ≤ 500 (LIMIT, default 200)

Vault sync (experimental vault-sync)

Registered only when EXPERIMENTAL_FEATURES contains vault-sync (otherwise 404). Used by inklingctl sync <vaultDir> --workspace <name|id>. Revision tokens are opaque strings (state-vector hash + delete-set hash + metadata hash since 0.15.1, docs/adr/1920-*); contentHash is SHA-256 of the normalized canonical markdown (frontmatter inkling-id, aliases, tags, page properties + body; attachments as /files/<id>; wikilinks as [[Current Title]] / [[Current Title|shown]]). docs/adr/0200–0202.

MethodPathNotes
GET/api/workspaces/:id/sync/changes?since=<cursor>→ { cursor, pages: [{ id, parentId, kind, title, updatedAt, revision, contentHash }], trashed: [{ id, deletedAt }] }. All visible live pages (≤ 20 000, else 413 TOO_MANY_PAGES); revision only for docs changed since since (and docs linking to pages renamed/trashed since then), null = unchanged; contentHash when cached for that revision. Pass the returned cursor next time (overlaps by 5 s)
POST/api/workspaces/:id/sync/read{ ids: uuid[] } (1–100) → { pages: [{ id, revision, contentHash, markdown }], missing: uuid[] }. Reads the live document when a browser has it open
PUT/api/pages/:id/sync/md{ markdown (≤ 1.5M chars), expectedRevision } → { revision, contentHash, markdown (canonical), droppedFrontmatterKeys }. Revision mismatch (incl. unsaved live edits) → 412 { error: { code: 'REVISION_MISMATCH' }, current: { revision, contentHash, markdown } }. Frontmatter replaces page properties/aliases (internal fullWidth kept). Applied through the collaboration server — open editors update live
POST/api/workspaces/:id/sync/pages{ parentId?: uuid|null, title, kind: 'doc'|'folder', markdown? } → { page: { id, parentId, kind, title, updatedAt }, revision?, contentHash?, markdown? } (doc fields only for kind: 'doc'). Scope inherits the parent
DELETE/api/pages/:id/sync?expectedRevision=Trash one leaf page (204). Docs require expectedRevision → 412 with current on mismatch; live sub-pages → 409 HAS_CHILDREN

Fix phase changes (docs/adr/0800–0815)

Errors may carry extra fields. AppError.details is merged into the error object: { "error": { "code": "...", "message": "...", ...details } }. Clients must ignore unknown keys.

DELETE /api/admin/users/:id — 409 SOLE_OWNER. Refused while the user is the only owner of any workspace:

{ "error": { "code": "SOLE_OWNER", "message": "…", "workspaces": [{ "id": "uuid", "name": "Team" }] } }

The admin UI should list workspaces and ask to promote another member to owner first (PATCH /api/workspaces/:id/members/:userId { role: "owner" } by that workspace's owner, or the admin as a member/owner there). On success the user's private pages go to the trash with no author: nobody (admins included) can see, restore or purge them; the 30-day trash purge removes them.

Visibility. A private page whose author no longer exists (created_by IS NULL) is visible to nobody. When a shared subtree containing such pages is moved to the private section, the mover becomes their author.

Page tree changes (POST /pages with parentId, PATCH /pages/:id with parentId/scope, restore/purge, duplicate/expand-canvas, POST /pages/from-template, vault-sync create, imports, collection batch rows):

GET /api/workspaces, POST /api/workspaces/join — inviteCode is "" unless the caller is an owner of that workspace. DELETE /api/workspaces/:id/members/:userId by an owner (removing someone else) regenerates the invite code.

PATCH /pages/:id/props, collection batch rows — 400 when a person cell references a user who is not a member of the workspace.

POST /pages/:id/publish/notion — real uploads (non-dry-run) are owner-only (403) and rate limited to 10/min.

Templates — templates saved from a private page (or with private: true) are listed/usable by their creator only; DELETE /templates/:id needs the creator or a workspace owner. See Templates.

Imports — folder depth ≤ 32, at most IMPORT_MAX_PAGES (default 5000) created pages, zip entries measured by real decompressed bytes (IMPORT_MAX_ENTRY_MB per entry, default 25; IMPORT_MAX_UNPACKED_MB total, default 50), at most IMPORT_MAX_FILES (default 300) files → 400 otherwise. Imported attachments get pageId of the first page that references them.

Login — 401 (the password was just changed) when a password reset committed while the login was being verified. A password reset also revokes the iCal feed token.

GET /api/health/ready — 200 {ok:true, db:true} / 503 {ok:false, db:false} (DB select 1, 2 s timeout, cached 5 s). /api/health stays a liveness check.

Collab — upgrades during shutdown or a DB failure get 503. When access is revoked the server sends a Hocuspocus PermissionDenied message with reason permission-changed and then closes the socket with code 4403.

Static — a missing /assets/* file is a 404 (not the SPA shell).


Templates

Guide and file format: TEMPLATES.md. Decisions: ADR 0920–0925. All routes need a session and workspace membership (a deleted workspace answers 404). :tid is a built-in key (meeting, standup, meetingSeries, project, kickoff, brainstorm, retro, readingList, weeklyReview) or a custom template uuid. Built-in text follows the request locale (users.locale → Accept-Language → DEFAULT_LOCALE).

MethodPathDescription
GET/api/workspaces/:id/templates{ templates: TemplateDTO[] } — built-ins, then custom templates visible to the caller (newest first). TemplateDTO { id, builtin, name, description, icon, category: 'docs'|'projects'|'meetings'|'personal'|'custom', kind: 'doc'|'structure', pageCount, scope: 'shared'|'private', mine, withDate, inputs: { name, default }[] }
POST/api/workspaces/:id/templatesSave a page as a template. { fromPageId, name ≤60, description? ≤300, icon? ≤16, category?, includeSubpages?, includeRows?, private? } → { template }. A private source page always gives a private template. More than 200 pages / 12 levels / 20 MB → 400 TEMPLATE_TOO_LARGE. 30/min
GET/api/workspaces/:id/templates/:tid/preview{ preview: { blocks: { type, text, depth, checked? }[] (first 14 blocks of the root document, plain text), truncated, outline: { kind, title, icon, depth, fields?, views?, rows? }[] } }
GET/api/workspaces/:id/templates/:tid/export.md (document template, frontmatter meta) or .zip (structure: inkling-template.json + pages/*). 20/min
POST/api/workspaces/:id/templates/import[?private=1]multipart file (.md / .zip, ≤ 25 MB) → { template }. Bodies go through the Markdown / JSON Canvas importers; invalid archive → 400 TEMPLATE_INVALID. 20/min
DELETE/api/templates/:id204. Built-in key → 403; creator, owner or admin only; a template of a workspace you are not a member of → 404 TEMPLATE_NOT_FOUND (docs/adr/1301-*)
POST/api/pages/from-template{ workspaceId, builtinKey | templateId, parentId?, scope?, title? ≤300, date?: 'YYYY-MM-DD', inputs?: { [question]: answer }, tz?: IANA zone } → { page, pages: PageMetaDTO[] (root first, depth-first), cursor?: { pageId, blockId, offset } }. Creates the whole tree in one transaction under the workspace tree lock (placement and depth checks as for page creation; under a parent the parent's section wins). Variables are substituted at this moment; withDate templates also set a date property on the root. 30/min

POST /api/pages/:id/instantiate and the page isTemplate flag were removed (ADR 0920); save the page with sub-pages as a template instead.

Workspace settings (docs/adr/0945–0953)

All routes in this section need a browser session (a bearer token gets 401 from outside /mcp, 403 through it). WorkspaceDTO.can (manage, editSettings, addMembers, inviteLink, export, publish) is the server's view of what the caller may do; every route re-checks.

MethodPathWhoBody / queryResponse
GET/api/workspaces/:id/settingsmember-{ settings: WorkspaceSettingsDTO, role, can }
PATCH/api/workspaces/:id/settingsownerupdateWorkspaceSettingsSchema (strict): inviteLinkEnabled, memberAddPolicy/exportPolicy (owners|admins|members), publicSharingDisabled (+ unpublishExisting: true removes every public link in the same transaction), trashRetentionDays 7–365, auditRetentionDays 30–730, reviewIntervalDays 7–730 or null{ settings, role, can, unpublished }; audited as settings.updated with changed fields
GET/api/workspaces/:id/auditowner, adminaction (exact, or a group such as member), actorId, cursor (id), limit ≤ 100AuditPageDTO { events, nextCursor, retentionDays }, newest first
GET/api/workspaces/:id/agentsowner, admin-{ connections: AgentConnectionDTO[], blocks: AgentBlockDTO[] } — OAuth connections of current members that reached this workspace (access, firstUsedAt, lastUsedAt, blocked)
POST/api/workspaces/:id/agents/blocksowner, admin (not owners' agents){ userId, clientId? } (no client = all agents of that member){ block: { id } }; idempotent
DELETE/api/workspaces/:id/agents/blocks/:blockIdowner, admin-204
POST/api/workspaces/:id/shared/unpublishowner, admin{ pageIds? } (omit = all){ unpublished }
GET/api/workspaces/:id/review-duemembermine=1ReviewDueDTO { intervalDays, today, items, archive, living }; items by priority score
POST/api/pages/:id/viewmember who sees the page-204; counts one web read (page total only)
GET/api/pages/:id/reviewmember who sees the page-{ review: PageReviewDTO }
PUT/api/pages/:id/ownermember who sees the page{ ownerId | null } (a member; private page: its author){ review }
POST/api/pages/:id/reviewmember who sees the page-{ review }; "Mark reviewed" now, by the caller
PUT/api/pages/:id/livingmember who sees the page{ living: true|false|null }{ review }

Changed rules:

v0.5.0 additions

Workspace two-step requirement (docs/adr/1112-*)

Large pages (docs/adr/1103-*)

Former titles (docs/adr/1121-*)

Imports (docs/adr/1122-*)

v0.6.0 additions

OpenID Connect sign-in (docs/adr/1160–1162)

Splitting pages and log rotation (docs/adr/1140–1142)

Events and the write gate (docs/adr/1150–1151)

v0.7.0 additions

Row templates (docs/adr/1180–1184)

Webhooks (docs/adr/1190–1192, WEBHOOKS.md)

API tokens and connection ranges (docs/adr/1200–1204)

find_context (docs/adr/1210–1212)

v0.8.0 additions

Admin: status (docs/adr/1230–1233)

Heavy jobs (docs/adr/1240)

v0.9.0 additions: guests and page levels (docs/adr/1250–1253)

All routes below are browser session only.

v0.10.0 additions

Workspace boundaries (docs/adr/1300–1302)

Query blocks (docs/adr/1320, 1352)

Collections (docs/adr/1351, 1353)

Ink (docs/adr/1340)

v0.11.0 additions

Later list and followed threads (docs/adr/1410–1413)

Migration 0039_v011_later_threads adds later_items, thread_follows and two columns on user_notification_settings.

MethodPathBody / queryResponse
GET/api/laterworkspaceId?, state=open|done{ items: LaterItemDTO[], open, due } — the caller's items, newest first (≤ 200). accessible: false items carry no title, preview, actor, anchor or notification type. Items of workspaces outside a token's range or blocked for the agent are left out. Read-only tokens may call it (MCP later)
GET/api/later/targetexactly one of pageId, threadId, notificationId, id{ item: LaterItemDTO | null } — is this target on my list
POST/api/later{ kind: 'page'|'thread'|'notification', pageId?, threadId?, notificationId?, anchor?, remindAt?: ISO | null, remindTz? }201 (new) / 200 (already saved: reopened; a remindAt in the body replaces the reminder) { item }. 404 when the caller cannot see the target (outsiders included); 400 for a workspace-level notification, a reminder in the past (more than 1 min) or more than 732 days ahead; 409 LATER_FULL at 500 open items
PATCH/api/later/:id{ done?: boolean, remindAt?: ISO | null, remindTz? }{ item } — own items only (404 otherwise). A new remindAt re-arms the reminder
DELETE/api/later/:id204
GET/api/threadsworkspaceId, all=0|1{ threads: ThreadSummaryDTO[], unread } — followed threads with replies by others since lastReadAt (all=1: every followed thread), newest activity first (≤ 100); pages the caller cannot see are left out. Guests: inside their shared trees
GET/api/pages/:id/thread-follows{ follows: ThreadFollowDTO[] } — the caller's rows on this page
GET/api/threads/:id/followThreadFollowDTO (source: null = no row)
PUT/api/threads/:id/follow{ following: boolean }ThreadFollowDTO. Following by hand reads the thread up to now. 404 for a reply id or a thread the caller cannot see
POST/api/threads/:id/read{}{ ok, notificationsRead } — reads the thread and marks the caller's unread bell rows of it (cr:/c:/cm: group keys) read

Changed:

v0.12.0 additions

Migrations 0040_v012_agent_ink_setting (workspaces.agent_ink_read) and 0041_v012_suggestions_leases (section_suggestions, section_leases, agent_edit_policies, catch_up_markers; catch_up markers move out of plugin_storage).

Agent notation and renamed sections (docs/adr/1500–1501)

Handwriting, versions, trash and files for agents (docs/adr/1510–1514)

catch_up, collection structure and MCP requests (docs/adr/1520–1526, 1537)

MethodPathRequestResponse
GET/api/catch-upsince?, workspaceId?, budget? (≤ 12,000, default 4,000), advance? (0 leaves the marker){ text, cursor, since: { at, source: 'given'|'connection'|'person'|'default' }, counts: { pages, comments, forYou, due, later, listed, hidden }, tokens }. Ranked "while you were away" text for the caller: inbox items created after since, due items (today − 14 days … + 7 days, undone), Later reminders due or within 7 days, comments created after since, change-log rows after since grouped per page (edits, people and clients, section diffs). since: a catch_up cursor, a changes_since cursor or an ISO time; omitted → the caller's last catch_up marker (per OAuth grant or API token, and per workspaceId, in catch_up_markers), else the person's, else 24 hours. 400 INVALID_SINCE; workspaceId requires membership. Read-only tokens may call it (it writes only the caller's marker). Same visibility as /changes, /inbox, /later and the due view. 30/min

Suggestions and section claims (docs/adr/1530–1539)

MethodPathRequestResponse
GET/api/pages/:id/suggestionspreview=1, all=1{ suggestions: SuggestionDTO[], claims: SectionClaimDTO[], canDecide }. Open suggestions of the page (all=1: also accepted, rejected, withdrawn), live section claims, and whether the caller may accept or reject. preview=1 adds to each open suggestion preview { found, currentAnchor, currentVersion, changed, before, after, ops: DiffOpDTO[] | null, large }. Members only (guests: 404); visible page, agent blocks and the connection's range apply
GET/api/suggestions{ suggestions }: the caller's own, open and decided in the last 7 days
GET/api/suggestions/:idpreview=1{ suggestion }
POST/api/suggestions/:id/accept{ confirmChanged?: boolean }{ suggestion }. People only (browser session or personal API token; OAuth/MCP → 403 PEOPLE_DECIDE), edit access. 409 SUGGESTION_CHANGED { preview } when the section changed since the agent read it and confirmChanged is not set; 409 SECTION_GONE { preview }; 409 SUGGESTION_DECIDED. 30/min
POST/api/suggestions/:id/reject{ suggestion }. People only, edit access
POST/api/suggestions/:id/withdraw{ suggestion }. The author (agents too)
POST/api/pages/:id/claims{ section, ttlSeconds? } (30–1800, default 300){ claim: SectionClaimDTO }. Bearer connections only (400 for browser sessions); doc pages; the caller must be able to edit or suggest there. 409 SECTION_CLAIMED when another connection holds it; 429 TOO_MANY_CLAIMS above 20 live claims per connection. 60/min
DELETE/api/pages/:id/claimssection{ released: boolean }

SuggestionDTO { id, pageId, workspaceId, anchor, headingPath, blockId, mode: replace|append|prepend|insert_after|delete|page_replace|page_append, origin: 'asked'|'lock'|'policy', status: open|accepted|rejected|superseded|withdrawn, markdown, baseVersion, author { id, name }, via, createdAt, decidedBy, decidedAt, rule, reviewReason, autoAt, applied?, preview? }. SectionClaimDTO { pageId, anchor, blockId, by, userId, mine, expiresAt }. At most 100 open suggestions per page.

Changed:

Saving tokens (docs/adr/1540–1543)

MethodPathRequestResponse
POST/api/pages/:id/sections{ edits: [{ ref, markdown, mode: replace|append|prepend|insert_after|delete, baseVersion? }], suggest? } (1–20 edits, ≤ 2,000,000 characters of Markdown in total){ ok, results: [{index, section: {anchor, headingPath, version} | null, movedFrom?}], sections }. Doc pages only; edits apply in order, all or nothing. Any failure → 409 SECTIONS_CONFLICT with error.conflicts: [{index, ref, anchor?, reason: version|not_found|ambiguous|duplicate|empty|claimed|invalid, message, baseVersion?, version?, markdown?}] and error.anchors (first 50), nothing written. With suggest, or where agent edits become suggestions: 202 { suggestions: SuggestionDTO[] }, all or none (a bad section answers the single error of POST /section, e.g. 404 SECTION_NOT_FOUND) (docs/adr/1538-). One "Before AI edit" snapshot when any edit is replace/delete (≤ 1 per page per 2 min). 30/min (docs/adr/1542-)

Agent edit policy and auto-accept rules (docs/adr/1544–1545)

MethodPathRequestResponse
GET/api/workspaces/:id/agent-policy{ policy: AgentPolicyDTO }. Members
PUT/api/workspaces/:id/agent-policy{ level: 'direct'|'auto'|'review', rules }{ policy }. Owners and admins, browser session only; audited as agent_policy.changed
GET/api/pages/:id/agent-rules{ policy }: the rules of an "Accept by rules" lock node (defaults when unset)
PUT/api/pages/:id/agent-rules{ rules }{ policy }. Who may manage the page's lock, browser session only; audited

rules = { modes: ('append'|'insert_after'|'prepend'|'replace'|'delete')[], connections: ('grant:<id>'|'token:<id>')[], maxLines: number|null, maxChars: number|null, graceMinutes: 0–10080 } (defaults: append, insert_after, prepend; every connection; no limits; no wait). AgentPolicyDTO { level, rules, canManage, updatedBy, updatedAt }.

Changed:

Several agents at once (docs/adr/1550–1552)

MCP tools

New: catch_up(workspaceId?, since?, budget?, peek?), read_ink(pageId, top?, height?, scale?), list_versions, diff_versions, read_file, list_trash, list_suggestions(pageId?) (read); patch_sections(pageId, edits, suggest?), create_collection(workspaceId, title, fields[], parentId?, private?), update_fields(collectionId, add?, change?, remove?, order?), restore_version, restore_page, withdraw_suggestion(id), claim_section(pageId, section, minutes?), release_section(pageId, section) (write, refused for read-only connections). New arguments: read_page(…, known?, knownSections?), read_pages(…, known?), list_pages / search format: "compact", patch_section(…, suggest?), changes_since(…, wait?) (0–25 s, only with a cursor; over the per-process (256) or per-connection (4) limit of waiting calls, or during shutdown, the answer comes at once and starts with wait skipped: …). Details: MCP.md.

v0.13.0 additions

No migration. collection_views.type may be chart and section_suggestions.status may be accepted_partial (text columns without a CHECK). Stored suggestion bases live in plugin_storage under the plugin id inkling:suggestion_base.

Charts (docs/adr/1600–1606)

MethodPathRequestResponse
POST/api/workspaces/:id/charts/aggregateChartAggregateInput (below)ChartDataDTO (below). Groups and measures the rows of a collection, or of a query block query, as the caller, with the collection query's access rules. Read-only tokens may call it. 240/min (docs/adr/1602-*)

ChartAggregateInput:

FieldType
source{ "type": "collection", "collectionId": uuid, "viewId"?: uuid } or { "type": "query", "query": string }viewId: a view of that collection; its saved filters choose the rows
groupBy{ "field": string, "bucket"?: "day" | "week" | "month" }field id or "title" (collection); column name (query)
seriessame as groupBy, optionalsecond grouping
measure{ "fn": "count" | "sum" | "avg" | "min" | "max", "field"?: string }, optionaldefault count; field (a number or rollup field / a column) for the others
sort"auto" | "label" | "valueDesc" | "valueAsc", optionalauto: option / date order, else largest first; "no value" last
limit1–100, optionalgroups returned (the rest are counted in omittedGroups)
today, tzOffsetMinutesoptionalquery sources, as POST /query

ChartDataDTO: source ({type:'collection', id, title, viewName?} or {type:'query'}), group / series ({field, name, type, bucket?}), measure ({fn, field?, name?}), groups ([{key, label, special?}], key null for "no value", special empty / checked / unchecked), seriesKeys?, values ((number|null)[], or [group][series]), rowCount, omittedGroups, omittedSeries, truncated? (the query returned part of its rows), elapsedMs, cached?.

Groupable field types: select, multi-select, person, date, checkbox, relation, text, URL, number and the title; measurable: number and rollup. People are member names (a non-member's id is "no value"); relations are the titles of visible linked rows. Errors: 404 NOT_FOUND (workspace, collection or view missing, hidden, of another workspace, or not a collection), 403 for non-members / guests / out-of-range tokens, 400 INVALID_CHART (unknown field, a field that cannot group or measure), 400 QUERY_SYNTAX / QUERY_TIMEOUT.

Changed:

Suggestions in parts (docs/adr/1621, 1622, 1626)

MethodPathRequestResponse
GET/api/pages/:id/suggestionspreview=1, status?, all=1As in 0.12. status = open (default) | decided (accepted, accepted_partial, rejected) | all | one status; all=1 is still the web history (everything but superseded). With preview=1, an open replace suggestion's preview adds merge: { baseKnown, key, hunks: [{ id, conflict, same, before, after, ours, context }] } (absent when the section is gone or too large to split)
GET/api/suggestionsstatus?{ suggestions }: the caller's own, the same filter, default open, newest 50. Since 0.23 the example suggestions seeded on a sample page (connection = 'example', docs/adr/2388-*) are left out; the page's own list still has them
POST/api/suggestions/:id/accept{ confirmChanged?, hunks?: number[], mergeKey?: string }{ suggestion }. hunks (ids from preview.merge, with its key as mergeKey) applies only those hunks: the server recomputes the merge and writes the merged section; a stale mergeKey → 409 SUGGESTION_CHANGED with error.preview. status is accepted or accepted_partial (partial: { applied, total }). Without hunks it behaves as in 0.12
POST/api/suggestions/:id/withdraw{ suggestion }. A suggestion that is no longer open answers 409 per state (below)

SuggestionDTO adds supersededBy? (the newer suggestion of the same connection for the same section) and partial? ({ applied, total }). status adds accepted_partial. 409 codes of accept and withdraw: SUGGESTION_SUPERSEDED, SUGGESTION_WITHDRAWN, SUGGESTION_DECIDED, SUGGESTION_UNSPLITTABLE (too large to split into hunks), SECTION_GONE; each message says the state, by whom, and for a replaced one the id of the newer suggestion.

Reverting changes (docs/adr/1620, 1623, 1624)

People only (browser session or personal API token; agent connections → 403 PEOPLE_DECIDE). Every revert route takes dryRun for the preview.

MethodPathRequestResponse
GET/api/pages/:id/changesbefore? (seq), limit? (1–100, default 20){ items: ActivityItemDTO[], next }: the page's own change log, newest first; each item has revert (below)
GET/api/pages/:id/section-provenance{ sections: SectionProvenanceDTO[] }: the newest change of each current section (heading marks, docs/adr/1627-*). Members only (guests 403); not a document page → []
POST/api/changes/:seq/revert{ dryRun? }RevertResultDTO. One change; edit access to its page. 404 when the change or its page is not visible. 30/min
POST/api/pages/:id/revert{ seqs? (1–200) | via, actorId?, since?, until?, dryRun? }RevertResultDTO. Given changes, or one agent's (via = client name, actorId narrows to one member's connection) on the page in a period; seqs or via is required (400 otherwise). 30/min
POST/api/workspaces/:id/revert{ via, actorId?, since, until?, dryRun? }RevertResultDTO. One agent's changes in the workspace; owners and admins. Each page is written all or nothing; locked pages are reported. 10/min

RevertResultDTO { dryRun, pages: [{ pageId, title, written, error?: { code, message }, changes: [{ seq, kind, anchor, headingPath, via, actor, changedAt, outcome, applied, conflicts: [{ wanted, now, reason: 'overlap' | 'no_source' }], plainText, reason? }] }], totals: { pages, changes, applied, partial, conflicts, unsupported, noop }, truncated }. outcome: applied | partial | conflict | noop | unsupported; reason (unsupported): large | page_event | moved | heading_only | section_gone | section_exists | no_source | too_complex. At most 300 changes per call (truncated when more matched; call again). Each written page gets a "Before revert" version first; the revert is an ordinary change of the person, audited as page.changes_reverted (before.seqs, before.via, after.seqs, after.conflicts).

GET /api/workspaces/:id/activity and GET /api/pages/:id/changes items gain revert: { revertable, revertedBy: { name, at } | null, isRevert }.

SectionProvenanceDTO { anchor, blockId, headingPath, seq, kind, changedAt, actor: { id, name }, via, agent, revertable, revertedBy: { name, at } | null, isRevert }, in outline order. Per section anchor the newest page_changes row the user may see (the same rows as GET /api/pages/:id/changes); a section whose newest change is a removal or has no known actor (live typing of several people) is left out, and so are anchors that are no longer in the outline. blockId is the heading block in the current outline. agent is true when via names an agent connection (not the public form, not an automation). seq is the change for POST /api/changes/:seq/revert. Rows are kept 30 days and one actor's edits of a section within 10 minutes are one row; a change appears about a second after a server write and 8–30 s after live typing.

Change feed (docs/adr/1625, 1650–1653)

MCP tools

New: create_chart(pageId, section?, placement?, collectionId? | query?, view?, kind, groupBy, bucket?, series?, seriesBucket?, measure?, measureField?, sort?, limit?, title?, options?, suggest?) and create_view(collectionId, type, name, config?, chart?) (write, refused for read-only connections). New arguments: list_suggestions(…, status?). Changed output: read_page shows chart tokens with a data line and section claims on every read form; changes_since and catch_up list collections, rows and row properties; query_rows describe=true is wrapped in <untrusted_content>. Details: MCP.md.

v0.14.0 additions

One migration, 0042_v014_semantic_vectors: table page_chunk_vectors (page_id, text_hash, workspace_id, model, dims, embedding real[]), written only while semantic search is on (docs/adr/1741-*). No other schema change.

find_context with several queries (docs/adr/1720–1723)

Admin: semantic search state (docs/adr/1744)

GET /api/admin/status gains an optional field, present only while semantic search is on (EMBEDDING_URL and EMBEDDING_MODEL set); off, the response is unchanged:

"semantic": {
  "enabled": true,
  "model": "bge-m3",
  "endpoint": "http://192.168.0.10:11434/v1/embeddings",
  "dims": 1024,
  "sections": { "indexed": 980, "pending": 20 },
  "chunks": { "indexed": 1210, "pending": 30, "rejected": 0 },
  "lastError": { "at": "2026-11-10T03:00:00.000Z", "message": "http://…/embeddings: timeout after 30000 ms" },
  "lastSuccessAt": "2026-11-10T03:01:00.000Z",
  "backoffUntil": null,
  "cache": { "workspaces": 2, "bytes": 5242880 }
}

endpoint is scheme, host and path only; the API key never appears. Counts are cached 30 s. When the counts cannot be read the field is { "enabled": true, "error": "status query failed" } (or "unavailable"), and the rest of the status answers as usual.

MCP tools

New arguments: find_context(…, queries?) (up to 5 phrasings; query becomes optional, one of the two is required). Changed output: with several queries the header names them by number and each fragment's paren line ends with ; matched: 1,3; with semantic search on, a section found only by meaning is shown with its text. Details: MCP.md.

v0.15.0 additions

Four migrations: 0043_v015_slack (slack_integrations, slack_user_links, slack_link_codes, slack_request_nonces), 0044_wave13_forms (collection_form_links), 0045_wave13_verify_present_status (pages.share_starts_at, page_verifications, user_statuses) and 0046_wave13_team_agents (notifications.connection, notifications.person_too, user_notification_settings.agent_handoff_copy). Formula fields and form views live in the existing jsonb columns (collection_fields, view config); collection_views.type may be form.

Slack app (docs/adr/1800–1806)

Settings (session cookie, workspace owners; others 403):

MethodPathRequestResponse
GET/api/workspaces/:id/slack–SlackSettingsResponse { integration: SlackIntegrationDTO | null, setup: SlackSetupInfo }. Never contains the token or the secret (botTokenHint is xoxb-… + the last 4 characters)
PUT/api/workspaces/:id/slack{ botToken?, signingSecret?, channelId, events: SlackEventKind[], enabled? }{ integration }. Token and secret are required the first time (400 SLACK_SECRETS_REQUIRED), omitted later = keep. Runs Slack's auth.test: 400 SLACK_AUTH_FAILED with error.slackError (Slack's code). Clears a pause. Audit: settings.updated, target slack
DELETE/api/workspaces/:id/slack–Disconnect; removes links, link codes and pending Slack jobs
POST/api/workspaces/:id/slack/test–Posts a test message → { ok, error } (Slack's code). A pass clears a pause
GET/api/workspaces/:id/slack/links–{ links: SlackLinkDTO[] }
DELETE/api/workspaces/:id/slack/links/:userId–Removes one member's link

Event kinds (SLACK_EVENT_KINDS): mention, assigned, suggestion, reply, digest. Bot scopes (SLACK_BOT_SCOPES): chat:write chat:write.public commands links:read links:write users:read users:read.email.

Linking (signed-in member; the /slack/link page of the web app calls these):

MethodPathRequestResponse
POST/api/slack/link/preview{ code }SlackLinkPreviewDTO; 404 unknown, expired or used code, 403 not a member of the workspace
POST/api/slack/link/confirm{ code }{ ok, workspaceId }; the code works once

From Slack (no session; the body is checked against the v0 signature, a 5-minute timestamp window, the team ID and the replay table; a failed check is 401 without detail):

MethodPathRequestResponse
POST/api/slack/w/:workspaceId/commandsSlash command (form-encoded). Text: <words>, help, link, unlinkAlways response_type: ephemeral. Slack's ssl_check=1 answers 200
POST/api/slack/w/:workspaceId/eventsEvents API JSON: url_verification, event_callback with link_shared, app_uninstalled, tokens_revoked{ challenge } for url_verification (unsigned only while no app is saved for a live workspace); otherwise 200 at once, unfurls are answered later through the outbox. A body that is not JSON is 400

Form views and public forms (docs/adr/1820–1822, 1870)

MethodPathRequestResponse
GET/api/collection-views/:id/form-link–{ shared, token, canPublish } for members who see the collection; 400 when the view is not a form
POST/api/collection-views/:id/form-link–Turn the public link on (owners and admins; 403 otherwise; 400 private collection or not a form; 403 PUBLIC_SHARING_DISABLED). Idempotent. Audit form.published
DELETE/api/collection-views/:id/form-link–Turn it off (owners and admins, or anyone who can edit the collection). Audit form.unpublished
GET/api/public/forms/:token– (no session)PublicFormDTO { title, description, submitLabel, successMessage, fields: [{ key, name, type, required, description, options? }], honeypot }. 60/min per IP. Cache-Control: no-store, X-Robots-Tag: noindex, nofollow, Referrer-Policy: no-referrer
POST/api/public/forms/:token{ values: { [key]: answer }, website?: "" } (strict; website is the honeypot){ ok: true }. 400 FORM_INVALID (fields: { key: "required" | "invalid" }), 404 closed or unknown link, 413 over 32 KiB, 429 RATE_LIMITED (10/min per IP, or 300/hour for the form)

Answers: text string ≤ 5,000 characters; number (or a numeric string); select/multiSelect option id or name; date YYYY-MM-DD; checkbox true/"on"; url ≤ 2,000 characters without spaces. Person, relation and formula properties are never taken from a public answer. The web page is /f/:token; it shares no route or gate with page links (/api/public/:token). A guessed token counts as a failure for the IP ban (reason form-token).

A public answer is made as the member who turned the link on, with via = "public form" (pages.created_via, page_changes.via_client). It counts as a person's input (docs/adr/1870-*):

Formula fields (docs/adr/1823–1827)

Page verification (docs/adr/1840–1842)

MethodPathWhoRequest / response
GET/api/pages/:id/verificationmembers (sessions and tokens){ verification: PageVerificationDTO | null, canVerify }
POST/api/pages/:id/verificationbrowser session; people who can edit the page; when the page has an owner, that owner or a workspace owner/admin{ expiresInDays (1–365) | expiresAt, note? (≤ 200) } (one of the two expiry forms); also sets the page's review time
DELETE/api/pages/:id/verificationsame as POST{ verification: null, canVerify }
GET/api/workspaces/:id/verified?days=1..90&mine=1members{ expiringDays, expired[], expiring[], verified[] }, visible pages only, at most 500

PageVerificationDTO: state ('verified' | 'expired'), expiringSoon, verifiedAt, verifiedBy { id, name } | null, expiresAt, note, changedSections, changedMuch. Errors: 403 (Pages are verified in the web app, Only the page's owner or a workspace admin can verify this page, PAGE_LOCKED), 400 (Folders are not verified, expiry out of range). Audit: page.verified, page.unverified.

Member status (docs/adr/1845–1846)

MethodPathWhoRequest / response
GET/api/me/statussigned in{ status: MemberStatusDTO | null }
PUT/api/me/statusbrowser session{ emoji? (≤ 16), text (≤ 80), clearAt?: ISO | null }; at least emoji or text; clearAt in the future, at most a year
DELETE/api/me/statusbrowser session{ status: null }

GET /api/workspaces/:id/members: each member gains status: { emoji, text, clearAt } | null (a status past clearAt is null). One status per account, the same in every workspace.

Team agents (docs/adr/1860–1866)

New routes (members only; guests 403):

Changed (additive):

Member statuses in row answers (docs/adr/1846, 1870)

GET /api/pages/:id/collection/query gains people?: string[]: the sorted user ids of the person cells shown on that page of rows, absent when there are none, so an answer without a person column is byte-identical to 0.14.

MCP tools

New arguments: create_view(…, type: "form", form?), field specs type: "formula" with expression (create_collection, update_fields), add_comment(…, handoffTo?), reply_comment(…, handoffTo?), catch_up(…, team?); update_row / create_row person values "this connection", grant:<id>, g:xxxxxxxx. Changed output: read_page verified / stale line and the owner's status; find_context verified marks; a last status: … line after writes that mention or assign people with a status and after query_rows; inbox marks items handed to this connection. Details: MCP.md.

v0.15.1 additions

One migration, 0047_v0151_index_stamp: column page_chunk_index.doc_updated_at (timestamptz, NULL), filled from page_docs.updated_at for existing rows. No route was added or removed. This release follows an outside evaluation of the agent tools and reports from a production server.

find_context (docs/adr/1900–1909)

Section writes (docs/adr/1960–1961)

Change feed (docs/adr/1960-*)

Inbox (docs/adr/1922-*)

Vault sync (docs/adr/1920-*)

Other behaviour

MCP tools

New arguments: read_page(…, backlinks?), create_page(…, kind?) (doc, canvas, folder), update_page(…, baseVersion?) for replace. workspaceId may be left out of list_pages, create_page, import_folder, create_from_template, create_collection and get_instructions when a page id names the workspace or the connection has one workspace. Every id argument takes an 8-character (or longer) prefix. Changed defaults and output: list_pages / search default to format: "compact"; text outputs print 8-character ids; outline lines are - §<anchor> ~N tok v=… indented per level, with an outline version; owner status, verified/stale and claims come after the page text; find_context prints can: once when all results share it, ; truncated, section ~N tok on a cut fragment and a last Verification: line; an inbox cursor of a filtered listing carries the filter (<seq>;ws=<id>;kinds=a,b). The tool list no longer carries a UUID pattern per id field or the SDK's execution and $schema defaults (docs/adr/1940–1948). Details: MCP.md.

v0.16.0 additions

Three migrations, all additive: 0048_wave16_taint (table connection_taints, column workspaces.agent_taint_demote boolean not null default true), 0049_wave16_agent_tokens (oauth_grants.kind text not null default 'oauth', oauth_grants.token_prefix), 0050_wave16_agent_uploads (workspaces.agent_uploads, files.uploaded_via and a partial index on files). This release is about MCP and working with AI agents.

MCP endpoint (docs/adr/2000-, 2060-, 2065-*)

Agent connection tokens (docs/adr/2060–2063)

Browser session only; a bearer token gets 403 (API tokens) or 401 (MCP tokens).

MethodPathBodyAnswer
GET/api/agent-tokens–{ tokens: AgentTokenDTO[] } newest first: { id, name, prefix ('ink_agt_' + 4), access: 'read'|'write', range, createdAt, expiresAt, lastUsedAt, suggestOnly: { until, sources } | null }. Never the token. id is the grant id (connection key grant:<id>)
POST/api/agent-tokens{ name (1–60), expiresInDays: 7|30|90|365, access: 'read'|'write', range } (strict)201 { token: AgentTokenDTO, secret: 'ink_agt_…' }, Cache-Control: no-store; the only time the secret is returned. 400 CLIENT_NAME_RESERVED, CLIENT_NAME_CLASH, VALIDATION, INVALID_RANGE; 409 TOO_MANY_TOKENS (20 live per account). Rate limit 20/min. Audits agent.token_created in each workspace in range
DELETE/api/agent-tokens/:id–204; 404 when not the caller's agent token. Revokes at once, hands back hand-offs, audits agent.token_revoked
PATCH/api/oauth/grants/:id{ range }(changed) also changes an agent token's range; audits agent.token_range_changed in every workspace the old or new range reaches
DELETE/api/oauth/grants/:id–(changed) also revokes an agent token, with the same effects
GET/api/oauth/grants–(changed) only connections made by OAuth (kind = 'oauth'); agent tokens are in /api/agent-tokens

Audit actions agent.token_created (target connection grant:<id>, label = name; after: { access, range, expiresAt }), agent.token_revoked, agent.token_range_changed (before.range, after.range: kinds). Never the token.

Suggest-only connections (docs/adr/2040–2043)

Files and uploads by agents (docs/adr/2044–2046, 2065)

Memory check and instruction length (docs/adr/2003-, 2004-)

MethodPathWhoAnswer
GET/api/workspaces/:id/notes-check?parentId=&limit=1..50members (tokens too)NotesCheckDTO { workspaceId, rootId, checked, broken { total, pages, items[{ pageId, title, count, links[{ text, state: missing|exists|trashed, targetId?, trashedOn? }] }] }, duplicates { total, items[{ title, pageIds }] }, unlinked { total, items[{ pageId, title, updatedOn }] }, verification { total, items[{ pageId, title, state: lapsed|changed, until, changedSections }] }, quietLarge { total, minTokens, before, items[{ pageId, title, tokens, updatedOn }] } }; visible pages only; parentId not visible → 404
GET/api/workspaces/:id/agent-instructions/lengthmembers{ limits: { lines: 200, bytes: 25000 }, always: { lines, bytes, tokens, long, pages }, pages: [{ pageId, mode, lines, bytes, tokens, long, truncated }] }; measured on the Markdown get_instructions sends (cut at 12,000 characters, truncated); sizes only

MCP tools

New tools: upload_file(pageId, name, text | base64, section?, attachOnly?), check_notes(workspaceId?, parentId?, limit?, budget?), more_tools(tool?, arguments?) (core profile only). read_file takes pages ("2-5") for PDFs and reads more text files by extension; returned text is scanned for injection-like content. get_instructions ends with a note: line when the instructions are over 200 lines or 25 KB. can: lines say suggest while the connection is suggest-only. Tool lists: full 47 tools (12,370 tokens), core 32 (7,437). Details: MCP.md.

v0.17.0 additions

Migrations 0051 (pages.row_number, edited_by, edited_via, collections.row_seq, ID triggers), 0052 (page_links.sections) and 0053 (page_snapshots.digest, step), all additive. Existing answers keep their shape unless noted; new fields are additive.

MethodPathAnswer
GET/api/pages/:id/backlinks(changed) adds sections only when a source has section links: { <sourcePageId>: [{ heading, status }] }, status found | renamed (the heading is called heading now) | missing (ADR 2101)
GET/api/pages/:id/headings{ headings: [{ blockId, text, level, anchor }] }: the page's section headings (top-level headings, ADR 0926), for the [[Page# menu. Documents only (others: []). Membership as /pages/:id/outline; guests 403 (ADR 2100)
GET/api/pages/:id/section-link?heading=&block=Which heading a section link means now: { status: 'found' | 'renamed' | 'missing', heading, blockId, anchor }, by block id, then name, then the change log's rename trace. heading 1–500 characters, block an optional block id. Read-only; no agent read recorded (ADR 2102)

Database views, public pages and the Markdown download (docs/adr/2120–2123, 2190)

Collections (docs/adr/2140–2147, 2192)

First-admin setup and the local trial (docs/adr/2160–2161)

Imports by connections and zip safety (docs/adr/2162–2163)

Versions: AI steps (docs/adr/2180–2182)

Agent search (docs/adr/2183–2184)

MethodPathQueryAnswer
GET/api/searchq (1–200 chars), workspaceId? (else every live workspace I belong to that does not block this agent, in the connection's range), limit? (1–50, default 10){ results: [{id, workspaceId, title, kind, scope, updatedAt, match: 'title'|'heading'|'body', exact, anchor?, shortAnchor?, headingPath?, snippet?}], total, workspaces: [{id, name, matches}], limit }. Match set as /api/workspaces/:id/search (title or body text contains q, case-insensitive; live, visible pages). Order: title equal to q → title with q as a whole word → title containing it → heading whole word → heading containing it → body whole word → body containing it, then updatedAt desc, then id. Whole word: no letter or digit (ASCII, Latin, Greek, Cyrillic, Hangul, kana, CJK) or _ right before or after; a query ending in a Hangul syllable may be followed by a fitting particle (+ 는/은/도/만). snippet only for body matches. total and workspaces[].matches count every match, shown or not. Read-only tokens allowed. With workspaceId: the errors of the workspace search route (403/404, OUT_OF_RANGE, AGENT_BLOCKED, TWO_FACTOR_REQUIRED)

The web app's GET /api/workspaces/:id/search is unchanged.

Vault sync (experimental vault-sync, docs/adr/2166–2169)

MCP tools

New tool: import_zip(base64, workspaceId?, parentId?, source?) (hidden group files). New arguments: search(…, limit?), list_versions(…, all?), query_rows(…, under?, depth?), create_row(…, parent?); create_collection and update_fields take the new field types, prefix and subItems. workspaceId arguments take a workspace name (inbox excepted). search output and find_context across workspaces changed (docs/adr/2184-, 2185-). Tool lists: full 48 tools (12,777 tokens), core 32 (7,533). Details: MCP.md.

v0.18.0 additions

Migrations 0054 (push_subscriptions, push_vapid_keys, push_settings), 0055 (collection_automations, automation_runs), 0056 (pages.doc_gen), 0057 (workspace_list_groups, workspace_listings) and 0058 (a new body for the row-number trigger function), all additive. Existing answers keep their shape unless noted; new fields are additive. "Browser session only" means a cookie session: bearer tokens (API tokens, MCP and agent connection tokens) get 403.

Offline copies (docs/adr/2200–2204)

MethodPathAnswer
GET/api/pages/:id/sync-check{ gen: number, canEdit: boolean, trashed: boolean, sv: string, needs?: number } (needs and ?schema= since 0.20, see "v0.20.0 additions") for the browser before it syncs a device copy. gen the page's document generation; canEdit whether the caller may edit the body now (lock, people rows, guest level; false when trashed); trashed the page is in the trash (a trashed page the caller could see answers 200 instead of 404); sv the base64 Yjs state vector of the live document (or of page_docs). Browser session only (403 for tokens); members and guests, as on the collaboration socket. 404 when the page is not visible or not a document; 403 not a member or guest of the workspace, or TWO_FACTOR_REQUIRED. Cache-Control: no-store

Web push (docs/adr/2220–2223)

Browser session only.

MethodPathBody / answer
GET/api/push/key{ available, publicKey }: the VAPID public key (base64url, a 65-byte point), or available: false (WEB_PUSH=off, key problem)
GET/api/push/settingsPushSettingsDTO { available, enabled, kinds[], hideContent, devices[] }; a device: { id, label, createdAt, lastSuccessAt, lastFailureAt, failureCount, current, stale }
PATCH/api/push/settings{ enabled?, kinds?: ('mention'|'assigned'|'reply'|'comment'|'approval'|'reminder'|'updates')[], hideContent? } → PushSettingsDTO. Default kinds: all but updates
POST/api/push/subscriptionsPushSubscription.toJSON() ({ endpoint, expirationTime?, keys: { p256dh, auth } }) and an optional label → 201 { id, device }. The same endpoint again is the same row (refreshed, bound to this session); another account registering it takes it over. 400 PUSH_SERVICE_NOT_ALLOWED (endpoint host not an allowed push service), 400 PUSH_SUBSCRIPTION_INVALID (the URL or key checks), 503 PUSH_UNAVAILABLE; a body of the wrong shape (missing keys, endpoint over 1,024 characters, label over 80) is the usual validation error. 20/min. At most 20 devices per person (the one longest without a delivery is dropped)
DELETE/api/push/subscriptions{ endpoint } → 204; removes this browser's row if it is the caller's (no error otherwise)
DELETE/api/push/devices/:id204, or 404 when not the caller's
POST/api/push/test{ deviceId? } → { queued }; 404 for a device that is not the caller's; 503 when unavailable. 5/min

Buttons and database automations (docs/adr/2240–2245)

MethodPathBody / answer
GET/api/collections/:id/automations{ automations: AutomationDTO[], canEdit }; members who can see the database (not guests). Tokens may read; canEdit is true only for a browser session with edit access
POST/api/collections/:id/automations{ name (1–80), enabled?, trigger, condition?, actions } → { automation }. Browser session only; edit access to the database (as PUT /pages/:id/collection/fields); 400 when a field, database or webhook does not fit; at most 20 rules per database; 30/min. The saver becomes the author
PATCH/api/collections/:id/automations/:ruleIda partial body → { automation }. { enabled: false } alone keeps the author; anything else (turning on included) makes the caller the author and checks the rule again; turning on resets the failure streak. Browser session only
DELETE/api/collections/:id/automations/:ruleId204. Browser session only
GET/api/collections/:id/automations/runs?automationId=&limit={ runs: AutomationRunDTO[] }, newest first, limit 1–100 (default 50): status ok / failed / skipped, failedAction (0-based), error, actorName, depth, rowTitle (null when the row is gone)
GET/api/workspaces/:id/webhook-targets{ targets: [{ id, kind, label, enabled }] } (label is the host); members
POST/api/pages/:id/button-webhook{ blockId, webhookId } → { ok: true }; members who can see the page; 10/min. 409 BUTTON_NOT_SAVED when the stored page has no such button with that hook (the collaboration store writes a few seconds after typing), 409 WEBHOOK_OFF, 429 RATE_LIMITED when the workspace's webhook queue is full

Web clipper (docs/adr/2260–2263)

MethodPathBody / answer
POST/api/clip{ workspaceId, parentId?, url? (http(s), ≤ 2,048), title? (≤ 300), text? (≤ 20,000), mode?: 'link' | 'article' (default link), tags?: string[] (≤ 10, each ≤ 40 letters, digits, _, - or /, a leading # allowed) }, at least one of url and text → 200 { page: PageMetaDTO, mode: 'link' | 'article', fallback?: 'fetch_failed' | 'not_html' | 'no_content', truncated?: true }
GET/api/clip/lookup?workspaceId=&url={ pages: [{ id, title, workspaceId, createdAt }] }: up to 5 live pages in that workspace, visible to the caller, whose source property is this URL (normalized), newest first. workspaceId is required. Members and guests (their visible pages only); tokens allowed

Workspace groups and archive (docs/adr/2300–2305)

Browser session only, reads included. A workspace id must be one the caller can open (a member of a live workspace, or a guest), else 404. Another person's group is 404.

MethodPathBodyAnswer
GET/api/me/workspace-groups–{ groups: [{ id, name, collapsed }] } in the person's order
POST/api/me/workspace-groups{ name } (1–40 characters, trimmed; at most 50 groups){ group }
PATCH/api/me/workspace-groups/:id{ name?, collapsed? }{ group }
DELETE/api/me/workspace-groups/:id–204; its workspaces become ungrouped (appended), their archive state is kept
PUT/api/me/workspace-groups/order{ ids } (≤ 50){ groups }; groups not listed keep their order after the listed ones
POST/api/me/workspace-groups/:id/archive{ archived }{ count } (every workspace in the group)
PATCH/api/me/workspaces/:id/listing{ archived?, groupId? } (null = no group; moving appends){ listing }
PUT/api/me/workspace-order{ groupId, ids } (≤ 500)204; the listed workspaces join the group at these positions

OAuth: Client ID Metadata Documents (OAUTH_CIMD=1, docs/adr/2280–2282)

MCP tools

No new tool and no description change: full 48 tools (12,777 tokens), core 32 (7,533), server instructions ~492. find_context, search and catch_up without workspaceId leave the caller's archived workspaces out and say so in a closing line; list_workspaces adds group and archived; query_rows describe=true lists enabled automations; buttons read as <!-- inkling:button … -->. Details: MCP.md.

v0.19.0 additions

Migration 0059 (pages.share_allow_download boolean not null default false), additive. Existing answers keep their shape; new fields are additive.

Public page downloads (docs/adr/2360–2363)

MethodPathAnswer
GET/api/public/:token/export.mdMarkdown of a single-page link's page, only when the link allows downloads (allowDownload). Same gate as /api/public/:token: unknown 404 (counted as a guess), expired 410, before a scheduled start 404, password 401 until unlocked; then a folder token or canvas → 404, download off → 404. 200 text/markdown; charset=utf-8, Content-Disposition: attachment; filename*=UTF-8''<title>.md, Cache-Control: no-store, X-Robots-Tag: noindex, nofollow. Content = the public page's blocks (no ids, no tokens, no frontmatter), links and files as absolute PUBLIC_URL addresses. 60/min
GET/api/public/:token/p/:ref/export.mdThe same for a page of a folder link (doc or collection); the folder link's setting applies. Ref outside the subtree, private or trashed → 404

Onboarding (docs/adr/2380–2383)

Migration 0060 (user_onboarding, a {"legacy": true} row for every account that existed before it). Browser session only: bearer tokens get 403.

MethodPathBodyAnswerNotes
GET/api/me/onboarding—OnboardingDTO { enabled, audience: owner|member|guest, intro, checklist: { show, collapsed, dismissed, complete, items: [{ id, done }] }, samples: { [workspaceId]: pageId } }The first call makes the person's row; for the first admin of a new server it also makes the sample page. 120/min
PATCH/api/me/onboardingany of { introSeen: true, collapsed, dismissed, event: slash|link|ai|explore|install } (strict)OnboardingDTO400 on an empty or unknown field. 60/min
POST/api/me/onboarding/sample{ workspaceId }{ pageId, workspaceId, created }Members (not guests) of the workspace; private pages; returns the live sample when there is one (created: false); 409 SAMPLE_IN_PROGRESS while one is being made; 404 ONBOARDING_OFF. 10/min

MCP tools

No new tool and no description change: full 48 tools (12,777 tokens), core 32 (7,533). Details: MCP.md.

v0.20.0 additions

One migration, 0061 (charts on public links, below). Existing answers keep their shape; new fields are additive.

Columns (docs/adr/2420–2424)

Document schema (docs/adr/2425)

Migration 0061 (pages.share_include_charts boolean not null default false, pages.share_charts_by uuid → users, on delete set null, pages.share_chart_sources jsonb — approved source keys, null while off), additive.

Public page HTML (docs/adr/2387)

MCP tools

No new tool and no description change; every tool now carries its annotation hints (docs/adr/2460-*): full 48 tools (13,245 tokens; 0.19: ~12,777), core 32 (7,857; 0.19: 7,533), server instructions unchanged (492). catch_up is no longer marked read-only and update_row is marked destructive. Details: MCP.md.

v0.21.0 additions

No migration and no server change: endpoints, request bodies and answers are the same as in 0.20.0.

PDF preview (docs/adr/2480–2482)

MCP tools

No new tool and no description change: the same numbers as 0.20, full 48 tools (13,245 tokens), core 32 (7,857), server instructions ~492. Details: MCP.md.

v0.22.0 additions

Migration 0062 (additive). Restricted mode: every setting is off unless the operator sets it (docs/OPERATIONS.md, section 17), and with none set every answer below that depends on a setting is the same as in 0.21.1. Account deletion, leaving a workspace alone and "delete now" exist on every server.

Settings in /api/auth/mode and /api/auth/me (docs/adr/2500–2503)

Sign-up (docs/adr/2501, 2512, 2516, 2519)

Account deletion and leaving (docs/adr/2513–2517)

Usage and limits (docs/adr/2505–2506)

Features turned off (docs/adr/2507)

Only while LEGAL_DIR is set; otherwise these routes are 404 and nothing below applies.

Error codes

StatusCodeWhendetails
400LOGIN_ID_INVALIDID mode: no loginId, or one that breaks the rules or is reserved—
409LOGIN_ID_TAKENID mode: the ID is taken (email mode keeps EMAIL_TAKEN)—
403SIGNUP_FULLThe server has SIGNUP_MAX_USERS accounts, or LIMIT_WORKSPACES_TOTAL workspaces (sign-up makes one)— before the transaction; { limit, used } for the workspace count inside it
429SIGNUP_IP_LIMITThe address made SIGNUP_PER_IP_PER_DAY accounts in 24 hours, or got 10 "taken" answers in 24 hours while that setting is on—
429SIGNUP_RATE_LIMITThe server made SIGNUP_PER_HOUR accounts in the last hour—
403LIMIT_WORKSPACES_TOTALPOST /api/workspaces when the server holds LIMIT_WORKSPACES_TOTAL workspaces (deleted ones that can still be restored included){ limit, used }
503INSTANCE_FULLThe instance storage fuse is tripped: a POST, PUT or PATCH under /api outside OPEN_WHEN_FULL, or a sign-up—
400SIGNUP_CHECK_FAILEDSign-up limits on: the hidden website field is filled, or formMs is missing or below 2000—
403SETUP_REQUIREDRestricted mode, no admin yet, sign-up without the setup code—
400CONSENT_REQUIREDSign-up or POST /api/legal/consent: another version, an unknown item, a required item not ticked{ version }
403CONSENT_REQUIREDAny other gated request before consenting to the current version{ version }
404FEATURE_DISABLEDA route of a feature in DISABLED_FEATURES{ feature }
403LIMIT_WORKSPACESCreating, taking over, promotion to owner or restoring past LIMIT_WORKSPACES_PER_USER{ limit, used }
403LIMIT_MEMBERSJoining or direct add past LIMIT_MEMBERS_PER_WORKSPACE{ limit, used }
403LIMIT_PAGESAny page-creating path past LIMIT_PAGES_PER_WORKSPACE (trash included){ limit, used }
413LIMIT_STORAGEThe workspace has reached LIMIT_WORKSPACE_STORAGE_MB or the write would pass it; or a page body past a quarter of it{ limit, used, unit: 'bytes' }; none for a page guest of the workspace (since 0.22.1)
413LIMIT_FILEAn upload larger than LIMIT_FILE_MB{ limit, used, unit: 'bytes' }; used is limit + 1 (the upload is cut there, its size is not known)
400LIMIT_TRASH_DAYSPATCH /api/workspaces/:id/settings with trashRetentionDays above LIMIT_TRASH_DAYS{ limit }
409LAST_ADMINDELETE /api/me by the only admin—
401REAUTH_REQUIREDDELETE /api/me by a delegated or OIDC account whose session is older than 10 minutes—
400CONFIRM_MISMATCHDELETE /api/me: confirm is not the sign-in email or ID—
400TOTP_REQUIREDDELETE /api/me: two-step verification is on and code is missing—

The details keys are sent inside the error object, next to code and message: { "error": { "code", "message", "limit", "used", "unit" } }. limit and used are numbers; the web app shows them in its own text. DELETE /api/me answers a wrong two-step code with 400 INVALID_TOTP_CODE (sign-in answers 401).

OAuth routes answer in the OAuth error format ({ error, error_description }):

MCP tools

No new tool and no server instruction change: the same numbers as 0.21 (full 48 tools, core 32); with LIMIT_FILE_MB below AGENT_UPLOAD_MAX_MB, upload_file's description names the smaller size. The tools are refused by the same limits, features and consent through the REST routes they call, and the errors of these codes carry a next step of their own (INSTANCE_FULL too: nothing was written, do not retry, the operator has to make room). list_trash dates follow LIMIT_TRASH_DAYS. Details: MCP.md.

v0.22.1 changes

No route added or removed, no migration (docs/adr/2540-* .. 2551-*). What a client or an integration can notice:

Markdown sourceView on GitHubAll docs