ServerRoutes & API
API Reference
Top-level routes and RPC exposure (how to add new endpoints).
Where to add routes
- Add a
routes/<Model>.tsfile that exports acreate<Model>Routes()function. - Re-export and attach the module in
routes/index.ts.
Important routes
/api/v1/health— health check (text "OK")./api/v1/*— feature routes (CRUD, Flows, Dynamic Objects, Extensions)./cdn/extensions/*— static artifact serving for extensions (configured inapp.ts).
Typed RPC
Frontend RPC clients use the Hono route types so adding a new route module will expose typed RPC until you update the routeTree.
Example: adding a new feature route
- Create
crm/server/routes/MyFeature.tswithcreateMyFeatureRoutes(). - Import and
.route("/", createMyFeatureRoutes())inroutes/index.ts. - Update tests and add documentation under
crm/docs/content/docs/server/routes/.