Skip to content
SupportDashboard

Change user phone number

POST
/user/phone-number/change

Request to change the authenticated user’s phone number. A one-time password is sent via SMS to the new phone number; complete the change by calling /user/phone-number/change/verify with the OTP. The current phone_number is left unchanged until verification succeeds. Requires elevated permissions.

New phone number to verify and bind to the user

object
newPhoneNumber
required

New phone number to bind to the user once verified via SMS OTP

string
Example
+123456789

Phone number change requested. An SMS with a verification code has been sent to the new phone number.

string
Allowed values: OK

An error occurred while processing the request

Standardized error response

object
status
required

HTTP status error code

integer
Example
400
message
required

Human-friendly error message

string
Example
Invalid email format
error
required

Error code identifying the specific application error

string
Allowed values: default-role-must-be-in-allowed-roles disabled-endpoint disabled-user user-already-exists email-already-verified forbidden-anonymous internal-server-error invalid-email-password invalid-request locale-not-allowed password-too-short password-in-hibp-database redirectTo-not-allowed role-not-allowed signup-disabled unverified-user user-not-anonymous invalid-pat invalid-refresh-token invalid-ticket disabled-mfa-totp no-totp-secret invalid-totp mfa-type-not-found totp-already-active invalid-state oauth-token-echange-failed oauth-profile-fetch-failed oauth-provider-error invalid-otp otp-too-many-attempts cannot-send-sms provider-account-already-linked