Verify a 6-digit SMS OTP code and update user phone number
POST
/api/auth/phone/verify-otp
const url = 'https://example.com/api/auth/phone/verify-otp';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"phone":"+17045550199","code":"839201"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/auth/phone/verify-otp \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "phone": "+17045550199", "code": "839201" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
phone
required
E.164 formatted contact phone number.
string
Example
+17045550199code
required
6-digit OTP verification code.
string
Example
839201Responses
Section titled “Responses”Phone verified and updated successfully
Media typeapplication/json
object
id
required
Unique identifier (UUID v4) for the resource.
string format: uuid
email
required
Primary email address.
string
fullName
required
Full legal or preferred name of the individual.
string
phone
E.164 formatted contact phone number.
string
Example
{ "id": "a1b2c3d4-e5f6-7890-abcd-1234567890ab", "fullName": "Sarah Jenkins", "phone": "+17045550199"}Invalid or expired verification code
Unauthorized