API reference
Auth API
Base URL https://klaw-voice.netlify.app. Full auth model: Authentication.
| Endpoint | Purpose |
|---|---|
POST /api/auth/signup | Create account → {token, user} |
POST /api/auth/login | Sign in → {token, user} |
GET /api/auth/me | Current profile |
POST /api/auth/api-key | Mint/rotate klw_ key (raw key returned once) |
DELETE /api/auth/api-key | Revoke the key |
POST /api/v1/events/stream-token | 120s klwst_ token for SSE URLs |
POST /api/auth/signup
Body: email, name, password (min 8 chars); optional phone, plan. Throttled per IP (10/hour). Returns 201 {token, user}.
POST /api/auth/api-key
Auth required. No body. Returns the raw key once; storing only its hash means it can never be re-shown — rotate by POSTing again. The dashboard shows a klw_…last8 preview under Settings.