Request email change
Body Parameters
New email address
Request Example
Response
Success
Error Responses
| Status | Message | Description |
|---|---|---|
error | Email already in use | The new email is already registered to another account |
error | Invalid email format | The provided email address is not valid |
error | 2FA validation required | User must validate 2FA before changing email |
error | Too many requests | Rate limit exceeded (1 request per 5 minutes) |
Validate email change
Body Parameters
Verification code from email (can be an array of strings or a single string)
Request Example
Response
Success
Error Responses
| Status | Message | Description |
|---|---|---|
error | Invalid or expired code | The verification code is incorrect or has expired (24 hours) |
error | Request not found | Invalid request ID |
error | Too many attempts | Too many failed validation attempts |
Once the email is changed, all active sessions except the current one will be terminated for security reasons.
Email Change Flow
- User calls
POST /user/email/change/requestwith new email (requires 2FA) - System sends verification email to the new email address
- User receives email with verification code
- User calls
POST /user/email/change/validatewith the code and request ID - Email is changed, old sessions are terminated
The verification link/code expires after 24 hours. You can request a new email change if the link expires.