Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

HTTP API

The apps, the web app and agents all talk to the server over HTTP. This is an overview of what’s there, for people running a server (what to route, what to monitor) and for anyone curious. The API is the apps’ own: it isn’t promised stable between minor versions, except where it says so. Agents should use MCP.

All of it is under public_url. Everything except the health checks, the version, sign-in and published pages needs a signed-in device: an access token bound to the device’s key (DPoP), or the web app’s cookie.

Open to anyone

Path
GET /healthz, GET /readyzHealth checks
GET /api/v1/version{"version": "1.0.0", "protocol": 2}; stable
GET /api/v1/auth/methodsThe sign-in methods that are on
/p/<token>A published page, when published pages have no host of their own
/robots.txtFor crawlers
/.well-known/oauth-protected-resourceMCP’s protected-resource metadata, for agents

Signing in

Path
/auth/…, /accountThe server’s sign-in and account pages, in the browser
/api/v1/auth/password/…, /api/v1/auth/passkeys/…, /api/v1/auth/magic-link/…The methods that are on (a method that’s off has no routes)
/api/v1/auth/oidc/<id>/start, /api/v1/auth/oidc/<id>/callbackSingle sign-on; the callback is the redirect URI to give your provider
/api/v1/auth/recoverRecovery and first sign-in links
/oauth/authorize, /oauth/token, /oauth/revoke, /oauth/consentOAuth 2.1 for the apps and agents, with PKCE, DPoP and resource indicators
/api/v1/account/…, /api/v1/meThe account: sign-ins, devices, keys for encrypted workspaces, agents, deleting it

Sync

GET /api/v1/sync upgrades to a WebSocket that carries every workspace a device syncs: subscriptions, pushes and updates of Loro documents, sealed entries for encrypted workspaces, and the key work devices do for each other. The protocol is versioned (protocol in /api/v1/version); protocol 2 is stable for 1.x. Its messages are defined in crates/drusite-proto.

Attachments go over plain HTTP beside it, under /api/v1/workspaces/<id>/…, bounded by [attachments] max_bytes rather than the request timeout.

Workspaces and features

Path
/api/v1/workspaces, /api/v1/workspaces/<id>/members, …/invites, …/invite-link, …/settings, /api/v1/join/<token>Workspaces, members and invitations
/api/v1/searchServer search
/api/v1/ask, /api/v1/workspaces/<id>/askAsk your notes; answers stream as server-sent events
/api/v1/ai, /api/v1/ai/providersAI providers and models: the server’s and the account’s
/api/v1/workspaces/<id>/ai-auditWhat was sent to which AI provider, for owners
/api/v1/workspaces/<id>/meetings…Meeting jobs
/api/v1/workspaces/<id>/sharesPublished pages
/api/v1/workspaces/<id>/views, …/updatesAnalytics and the Updates feed
/api/v1/workspaces/<id>/agent-activityWhat agents changed, for undo
/api/v1/account/agent-devices, /api/v1/agent-devices/…Agent devices: adding, enrolling, checking tokens
/mcpMCP over Streamable HTTP, for agents

Every request

  • An X-Request-Id comes back on every response, and is in the server’s log.
  • Ordinary requests have [server] request_timeout_secs (30 s); the sync WebSocket, Ask’s streams and attachments don’t.
  • Who may do what is decided by a Cedar policy, and repeated by PostgreSQL’s row-level security. See the security model.