Change Email
Changes the email address for an account.Path Parameters
Account identifier
Request Body
Current email address for verification
New email address
Account password for verification
Response
New JWT token with updated email information
Response Codes
200 OK- Email changed successfully400 Bad Request- Invalid email format or same as current email401 Unauthorized- Missing or invalid authentication token404 Not Found- Account not found or incorrect password
Examples
Success Response
Error Response Examples
Email Already in Use (400 Bad Request):Change Password
Changes the password for an account.Path Parameters
Account identifier
Request Body
Current password for verification
New password (must meet security requirements)
Response
204 No Content- Password changed successfully
Response Codes
204 No Content- Password changed successfully400 Bad Request- New password same as current or doesn’t meet requirements404 Not Found- Account not found or incorrect current password
Examples
Error Response Examples
Same Password (400 Bad Request):Security Best Practices
After changing email, users receive a new JWT token with updated claims. The old token remains valid until expiration.
Password Requirements
Passwords should meet the following criteria:- Minimum 8 characters
- At least one uppercase letter
- At least one lowercase letter
- At least one number
- Special characters recommended
Email Change Flow
Additional Notes
- Email changes are immediate and don’t require verification (consider adding email verification in production)
- Password changes take effect immediately
- Users should be logged out from other sessions after password change for security
- Both endpoints require valid authentication tokens
- Account ID in the path must match the authenticated user’s account