Routes
Routes
The complete HTTP surface: every route, method, request shape, and response contract.
Routes
Every HTTP route the library mounts, the request it expects, and the response it returns. Auth on each route is Public (no session needed) or Session (the session cookie is required). Admin routes additionally need role: "admin".
Conventions used on every page:
- Request and response bodies are
application/jsonwith camelCase fields. No streaming, no file uploads, no multipart forms. - Success responses carry a
messageplus route-specific fields, except204 No Content(no body) and a few list/count routes documented per page. Failures use the{"error": code, "message": ...}envelope; see Error handling for the taxonomy. - Tokens travel in cookies (
goauth_session,goauth_refreshby default), never in bodies. State-changing requests needOriginandX-CSRF-Token; see Security. - Some route groups are conditional:
POST /auth/registerneedsEnableEmailPassword; invite routes needEnableInvite; OAuth routes needEnableOAuthplus a registered provider; org routes (both self-service and admin) need organizations enabled. Unmounted groups are not 404 fallthroughs: the paths simply do not exist.
Pages
| Page | Covers |
|---|---|
| Authentication | Register, login, logout, identity, password flows, email verification, invites, account deletion, email 2FA |
| Sessions | Refresh, list, revoke, CSRF token |
| OAuth | Provider login, callback, link, unlink, connected accounts |
| Organizations | Orgs, members, invites, active org |
| Admin | Admin login, users, sessions, audit logs, stats, orgs, invites |
Audit reads live under Admin (GET /admin/audit-logs and per-user variants). There are no user-scoped audit routes.
Next
- Error handling: the complete error taxonomy
- Security: session security, CSRF, and rate limiting