Endpoint
Headers
User authentication token received from login
Request body
New email address for the user
URL to user’s avatar image
User bio/description text
New password (will be hashed before storage)
Custom CSS to style the user’s profile page
URL to background image for user’s profile
Response
Success message confirming settings update
Error message if the request failed
Status codes
- 200: Settings updated successfully
- 400: No fields to update or email already taken
- 401: Unauthorized (invalid or missing token)
- 500: Internal server error
Example request
Example responses
Notes
- At least one field must be provided for update
- Passwords are automatically hashed using Werkzeug’s password hashing
- Email must be unique across all users
- All fields are optional - only send what you want to update