Skip to main content

Request email change

POST /user/email/change/request
Permission: Connected + API + 2FA Initiates an email change request. Requires 2FA validation.

Body Parameters

email
string
required
New email address

Request Example

{
  "email": "[email protected]"
}

Response

Success
{
  "status": "success",
  "data": "Email change request created successfully"
}

Error Responses

StatusMessageDescription
errorEmail already in useThe new email is already registered to another account
errorInvalid email formatThe provided email address is not valid
error2FA validation requiredUser must validate 2FA before changing email
errorToo many requestsRate limit exceeded (1 request per 5 minutes)
Email change requests require 2FA validation. Make sure you have validated your 2FA for the current session before making this request.

Validate email change

POST /user/email/change/validate
Permission: Connected + API + 2FA Completes an email change using the verification code sent to the new email address.

Body Parameters

code
string
required
Verification code from email (can be an array of strings or a single string)

Request Example

{
  "code": "123456"
}

Response

Success
{
  "status": "success",
  "data": "Email change validation success"
}

Error Responses

StatusMessageDescription
errorInvalid or expired codeThe verification code is incorrect or has expired (24 hours)
errorRequest not foundInvalid request ID
errorToo many attemptsToo 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

  1. User calls POST /user/email/change/request with new email (requires 2FA)
  2. System sends verification email to the new email address
  3. User receives email with verification code
  4. User calls POST /user/email/change/validate with the code and request ID
  5. 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.