API overview
Hono Worker at your API origin. JSON in / JSON out. Public routes for the widget and portal; session-protected routes for the dashboard.
Base URL
| Environment | Base |
|---|---|
| Local | http://localhost:8787 |
| Production | https://api.openroadmap.app |
CORS
Controlled by Worker var ALLOWED_ORIGINS (comma-separated). Supports exact origins and *.openroadmap.app-style host suffixes. Credentialed requests allowed for dashboard session headers.
Auth
- Public — no auth (widget + portal reads + votes)
- Session — header
X-OpenRoadmap-Session: <token>orAuthorization: Bearer <token>fromPOST /v1/auth/login
Errors
{ "error": "Domain not allowed for this project" }| Status | Meaning |
|---|---|
400 | Validation (missing message / invalid status) |
401 | Missing / invalid session |
403 | Domain not allowlisted |
404 | Unknown project, feature, or submission |
Note
Health check: GET /health → { ok, service, demo, kv, queue }