docs: add authentication and user management API endpoints
Phase 2 part 2: Split auth and user endpoints - Authentication: register, login, refresh_token, logout - Users: get_profile, update_profile, update_theme, change_password - Each endpoint in separate markdown file - Include request/response examples and error codes
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
# Update Theme
|
||||
|
||||
Update the current user's theme preference.
|
||||
|
||||
**Endpoint**: `PUT /api/users/me/theme`
|
||||
**Auth**: Required
|
||||
**Content-Type**: `application/json`
|
||||
|
||||
## Request Body
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
|--------|------|-----------|-------------|
|
||||
| theme | string | Yes | Theme name (e.g., "tokyo-night", "dracula") |
|
||||
|
||||
### Example Request
|
||||
|
||||
```json
|
||||
{
|
||||
"theme": "dracula"
|
||||
}
|
||||
```
|
||||
|
||||
## Response (200 OK)
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "uuid",
|
||||
"email": "user@example.com",
|
||||
"username": "john",
|
||||
"theme": "dracula",
|
||||
"role": "user"
|
||||
}
|
||||
```
|
||||
|
||||
## Error Responses
|
||||
|
||||
| Code | Description |
|
||||
|------|-------------|
|
||||
| 400 | Invalid theme name |
|
||||
| 401 | Invalid or expired token |
|
||||
|
||||
## Try It Out
|
||||
|
||||
<!-- API Explorer will be inserted here in Phase 3 -->
|
||||
Reference in New Issue
Block a user