user

Change user email

Changed on

Request to change the authenticated user's email address. A verification email will be sent to the new address to confirm the change. Requires elevated permissions.

post/user/email/change

Request

  • Base URL
    https://{subdomain}.auth.{region}.nhost.run/v1
  • URL
    https://{subdomain}.auth.{region}.nhost.run/v1/user/email/change
  • Auth
    HTTP bearer

Request body

newEmailstring email required

A valid email

codeChallengestring

PKCE code challenge (S256). When provided, the verification redirect will contain an authorization code instead of a refresh token.

Example request

{
  "newEmail": "john.smith@nhost.io",
  "options": {
    "redirectTo": "https://my-app.com/catch-redirection"
  }
}

Response

Email change requested. An email with a verification link has been sent to the new address

'OK' required

Changes

    • warning

      added the new otp-too-many-attempts enum value to the response property for the response status

    • warning

      added the new user-already-exists enum value to the response property for the response status

    • info

      removed the email-already-in-use enum value from the response property for the response status