Skip to content

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 /readyz Health checks
GET /api/v1/version {"version": "1.3.2", "protocol": 2}; stable
GET /api/v1/auth/methods The sign-in methods that are on
/p/<token> A published page, when published pages have no host of their own
/robots.txt For crawlers
/.well-known/oauth-protected-resource MCP’s protected-resource metadata, for agents

Signing in

Path
/auth/…, /account The 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>/callback Single sign-on; the callback is the redirect URI to give your provider
/api/v1/auth/recover Recovery and first sign-in links
/oauth/authorize, /oauth/token, /oauth/revoke, /oauth/consent OAuth 2.1 for the apps and agents, with PKCE, DPoP and resource indicators
/api/v1/account/…, /api/v1/me The 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/search Server search
/api/v1/ask, /api/v1/workspaces/<id>/ask Ask your notes; answers stream as server-sent events
/api/v1/ai, /api/v1/ai/providers AI providers and models: the server’s and the account’s
/api/v1/workspaces/<id>/ai-audit What was sent to which AI provider, for owners
/api/v1/workspaces/<id>/meetings… Meeting jobs
/api/v1/calendars, …/events, …/caldav, …/feed, …/nextcloud, …/oauth/<google|microsoft>, …/oauth/callback, …/shown/<calendar>, …/accounts/<id> Connected calendars: what’s connected, connecting one (OAuth, CalDAV, a Nextcloud’s login flow, a feed), showing or hiding a calendar, disconnecting; and the events of a range, fetched when asked and never stored
/api/v1/workspaces/<id>/shares Published pages
/api/v1/workspaces/<id>/views, …/updates Analytics and the Updates feed
/api/v1/workspaces/<id>/agent-activity What agents changed, for undo (in an encrypted workspace a device undoes it, then posts …/<call>/undone)
/api/v1/agent-tokens The account’s agents through /mcp: making a token (with its key, for an encrypted workspace), listing them, changing what one may do (PATCH …/<id>), rotating one (POST …/<id>/rotate: a new secret, and new keys, for the same entry; the old one is refused at once), revoking one
/mcp MCP 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.