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,39 @@
|
||||
# Change Password
|
||||
|
||||
Change the current user's password.
|
||||
|
||||
**Endpoint**: `PUT /api/users/me/password`
|
||||
**Auth**: Required
|
||||
**Content-Type**: `application/json`
|
||||
|
||||
## Request Body
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
|--------|------|-----------|-------------|
|
||||
| current_password | string | Yes | Current password |
|
||||
| new_password | string | Yes | New password (min 8 chars) |
|
||||
|
||||
### Example Request
|
||||
|
||||
```json
|
||||
{
|
||||
"current_password": "oldPassword",
|
||||
"new_password": "NewSecureP@ss123!"
|
||||
}
|
||||
```
|
||||
|
||||
## Response (204 No Content)
|
||||
|
||||
Password changed successfully.
|
||||
|
||||
## Error Responses
|
||||
|
||||
| Code | Description |
|
||||
|------|-------------|
|
||||
| 400 | Invalid input or weak password |
|
||||
| 401 | Current password is incorrect |
|
||||
| 401 | Invalid or expired token |
|
||||
|
||||
## Try It Out
|
||||
|
||||
<!-- API Explorer will be inserted here in Phase 3 -->
|
||||
Reference in New Issue
Block a user