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,41 @@
|
||||
# Refresh Token
|
||||
|
||||
Obtain a new JWT token using a refresh token.
|
||||
|
||||
**Endpoint**: `POST /api/auth/refresh`
|
||||
**Auth**: Not required (uses refresh token)
|
||||
**Content-Type**: `application/json`
|
||||
|
||||
## Request Body
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
|--------|------|-----------|-------------|
|
||||
| refresh_token | string | Yes | Valid refresh token |
|
||||
|
||||
### Example Request
|
||||
|
||||
```json
|
||||
{
|
||||
"refresh_token": "d4f5g6h7..."
|
||||
}
|
||||
```
|
||||
|
||||
## Response (200 OK)
|
||||
|
||||
```json
|
||||
{
|
||||
"token": "new-jwt-token",
|
||||
"refresh_token": "new-refresh-token"
|
||||
}
|
||||
```
|
||||
|
||||
## Error Responses
|
||||
|
||||
| Code | Description |
|
||||
|------|-------------|
|
||||
| 401 | Invalid or expired refresh token |
|
||||
| 400 | Missing refresh token |
|
||||
|
||||
## Try It Out
|
||||
|
||||
<!-- API Explorer will be inserted here in Phase 3 -->
|
||||
Reference in New Issue
Block a user