API Reference

A typed REST + realtime API

Generated SDK in packages/sdk, JWT-secured, RBAC-enforced, with Socket.IO streams for realtime audit and ingestion events.

MethodEndpoint
POST/auth/loginAuthenticate and receive a JWT
GET/workspacesList workspaces for the current user
POST/workspaces/:id/filesUpload a file for ingestion
GET/files/:idFile metadata & ingestion status
GET/files/:id/pages/:nRendered markdown for a page
POST/chat/sessionsCreate a chat session
POST/chat/sessions/:id/messagesStream a RAG response (SSE)
GET/analytics/overviewUsage & ingestion metrics
GET/audit/streamRealtime audit events (Socket.IO)
PATCH/system/settingsUpdate runtime configuration (super_admin)
# Example — stream a RAG answer
curl -N https://rag.internal/chat/sessions/abc/messages \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "query": "Net income trend FY22-FY24?", "scope": "workspace" }'