API reference

Auth API

Base URL https://klaw-voice.netlify.app. Full auth model: Authentication.

EndpointPurpose
POST /api/auth/signupCreate account → {token, user}
POST /api/auth/loginSign in → {token, user}
GET /api/auth/meCurrent profile
POST /api/auth/api-keyMint/rotate klw_ key (raw key returned once)
DELETE /api/auth/api-keyRevoke the key
POST /api/v1/events/stream-token120s 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.