API Reference
The SAFUU Intel backend exposes a REST API + WebSocket. All endpoints except public ones require authentication.
BASE URLhttps://api.your-server.comConfigure in .env → API_BASE_URL
AUTHENTICATION
API KeyX-Api-Key: your-DASHBOARD_API_KEYAdmin/Analyst endpoints
JWT TokenAuthorization: Bearer <token> (from POST /api/auth/login)Admin dashboard
NoneNo header requiredPublic endpoints only
SystemAuthPublicAdminSecurityRealtime
POST/api/auth/loginAuthnone›
GET/api/public/statsPublicnone›
GET/api/public/transparencyPublicnone›
GET/api/personsAdminAPI Key›
POST/api/persons/:id/escalateAdminAnalyst+›
GET/api/analyticsAdminAPI Key›
GET/api/ledgerSecurityAPI Key›
POST/api/admin/thresholdAdminAnalyst+›
GET/api/security/auditSecurityAdmin›
WebSocket/ws?key=<api-key>RealtimeAPI Key›
// API binds to 127.0.0.1:3001 by default — Nginx proxies externally
// All endpoints require TLS in production — see safuu-nginx.conf
// Rate limits: 100 req/min per API key · Sliding window, SQLite-backed