Change Email
PUT/api/users/me/email
Change the email of the currently authenticated user.
If email is enabled, the user needs to verify this email address with a token that is sent to the new email address. Only then the email is changed in the database. If email is disabled, the email will be changed immediately.
Requirements
- The
emailshould be a valid email address (e.g., "[email protected]") that is not associated to an existing account.
You can find more information about profile management here.
Locale
A locale can be specified for this request. The email will be sent in the specified locale. You can learn more about locale in emails here.
If no locale is specified, the applications default locale will be used. You can learn more about configuring the default locale here.
Tokens
- A valid
AccessTokenis required. - A valid
StepUpTokenis required. This token should match user and session contained in theAccessToken.
Request
Responses
- 200
- 401
- 404
- 409
- 500
If email is enabled, verificationRequired will be true indicating that this request did not update the user, otherwise verificationRequired is false. Since this request sends an email, the remaining cooldown in seconds will be returned.
The following error codes correspond to this status:
ACCESS_TOKEN_EXPIRED: Indicates that the access token is expired.ACCESS_TOKEN_INVALID: Indicates that the access token cannot be decoded.AUTHENTICATION_REQUIRED: User is not authenticated.STEP_UP_TOKEN_EXPIRED: Indicates that the step-up token is expired.STEP_UP_TOKEN_INVALID: Indicates that the step-up token cannot be decoded.STEP_UP_TOKEN_MISSING: Thrown when the step-up token is missing.
The following error codes correspond to this status:
USER_NOT_FOUND: User not found.
The following error codes correspond to this status:
EMAIL_TAKEN: Email address is already taken.
The following error codes correspond to this status:
ACCESS_TOKEN_ALLOWLIST_READING_FAILURE: Represents an exception indicating a failure when reading the allowlist for an access token cache.DATABASE_FAILURE: Exception representing a general failure related to database operations.DATABASE_ENCRYPTION_FAILURE: Exception representing a general failure related to database encryption operations.POST_COMMIT_SIDE_EFFECT_FAILURE: Exception representing a failure to perform a side effect after a successful database operation.