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
733 B
733 B
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
{
"refresh_token": "d4f5g6h7..."
}
Response (200 OK)
{
"token": "new-jwt-token",
"refresh_token": "new-refresh-token"
}
Error Responses
| Code | Description |
|---|---|
| 401 | Invalid or expired refresh token |
| 400 | Missing refresh token |