Wiki
API v1

Overview

The two ways to call the API — type-safe RPC and generated REST.

The server exposes the same router two ways. Pick the one that fits your caller.

The surfaces

PathSurface
/rpcType-safe oRPC endpoint the clients call.
/v1Generated OpenAPI document + interactive reference.
/api/auth/*Better Auth routes (sign-in, session, organization, etc.).
/healthDeep health check (verifies the database).

Both /rpc and /v1 are generated from one router definition, so they never drift. See API & oRPC for how that works.

Router map

The top-level routers, each in its own module under packages/api/src/routers:

RouterResponsibility
spacesCreate and manage spaces.
spaceMembersSpace membership and roles (myRole).
pagesPage CRUD, lifecycle, tree, drafts, revisions.
pageAccessPer-page ACLs (get, setVisibility, members).
commentsCreate, resolve, moderate comments.
tagsTag CRUD and assignment.
attachmentsUpload and delete attachments.
linksInternal link / backlink tracking.
activityActivity feed / audit stream.
searchFull-text search.
mePer-user state (favorites, subscriptions).
onboardingFirst-run org creation and sample seeding.
dashboardAggregated home-screen data.
healthLiveness probe.

Authorization

Every non-public procedure is gated. Organization capabilities use requireOrgPermission / assertOrgPermission; content actions use space/page capabilities. See Permissions.

On this page