# User Profile & Settings ### Profile ``` GET /profile → profileResponse PUT /profile ← { "display_name", "email" } ``` ```json { "id": "uuid", "username": "jdoe", "email": "jdoe@example.com", "display_name": "Jane Doe", "role": "user|admin", "avatar_url": "...", "created_at": "...", "last_login": "..." } ``` ### Avatar ``` POST /profile/avatar ← multipart/form-data (field: "avatar") DELETE /profile/avatar ``` ### Password ``` POST /profile/password ``` ```json { "current_password": "...", "new_password": "..." } ``` On password change, the UEK is re-wrapped with the new password (BYOK keys remain accessible without re-encryption). ### App Settings ``` GET /settings → { "settings": {...} } PUT /settings ← { "theme", "editor_keybindings", ... } ``` User-level preferences (theme, keybindings, default model, etc.). ---