Skip to main content
Everything Scribe can do is available through its REST API — the web app is just another client. Documents, folders, content, sharing, comment threads, search, members, and activity are all first-class resources under https://scribe.skeptrune.com/api. The full interactive reference is generated from the same OpenAPI 3.1 spec the server serves at /openapi.json — browse it in the API reference tab.

Authentication

Two credential types, checked in this order:
API keys are org-scoped agent credentials of the form scrb_agt_.... Mint one in Settings → API keys in the app (or via POST /api/org/api-keys, which requires an admin session). The secret token is shown exactly once at creation — only a hash is stored.
Keys carry an access level — read or edit — and can be given an expiry. Each key acts through its own agent identity — a first-class member of the organization (named after the key, like nick-claude) that can own documents, author comments and suggestions, and appears in activity feeds with an agent badge. An edit key can do everything a member can in the document domain — create and manage docs, folders, shares, threads, and even further API keys — while account administration (profile, org settings, members, invites) remains session-only.Some endpoints (membership, sharing, threads, key management itself) require a human actor and reject API keys with a 401 user_session_required error. Each operation’s reference page lists which credentials it accepts.

Errors

Every non-2xx response has the same envelope:
code is a stable machine-readable value: validation_error, unauthorized, user_session_required, forbidden, not_found, conflict, payload_too_large, unsupported_media_type, or internal_error. message is a human-readable explanation and may change; branch on code.

Writing content converges into live editors

The flagship example of API-first design: PUT /api/docs/{id}/content takes raw text/markdown (up to 4 MB) and applies it through the document’s collaborative session, not around it.
The document’s Durable Object diffs the new markdown against the live CRDT state and applies the change as an incremental update. Everyone with the document open sees the API’s edit appear in real time, their cursors survive, and anything they type concurrently merges instead of being clobbered. A bot updating a status doc and a human editing it at the same moment is a supported, conflict-free case. Reading is symmetric: GET /api/docs/{id}/content returns the current text/markdown — including edits made seconds ago in someone’s browser.

Conventions

  • Base URL: https://scribe.skeptrune.com — all operation paths in the reference are relative to it.
  • Formats: JSON everywhere, except document content, which is text/markdown.
  • Timestamps: epoch milliseconds.
  • Activity: every mutation — human or API key — lands in the activity feed with its actor, so automation stays auditable.