Skip to main content
POST
/
v1
/
auth
/
register
/
phone
/
verify
{
  "onboardingId": "<string>",
  "user": {}
}

Overview

Verify the SMS code received by the user and update their onboarding record with the verified phone number. After verification, the user can proceed to the next onboarding step (personal details).

Request

Body

onboardingId
string
required
Onboarding ID from email verificationExample: US_100a99cf-f4d3-4fa1-c123-2e9833440ebb
phoneCountryCode
string
required
Phone country calling codeExample: +44
phoneNumber
string
required
Phone number without country codeExample: 7400846282
contactVerificationId
string
required
Verification ID from email send stepExample: US_100a99cf-f4d3-4fa1-9be9-2e9828b20ebb
verificationCode
string
required
6-digit code received via SMSExample: 123456

Response

onboardingId
string
Updated onboarding IDExample: US_100a99cf-f4d3-4fa1-c123-2e9833440ebb
user
object
Updated user object with verified phone number

Code Examples

const response = await fetch('https://dev.api.baanx.com/v1/auth/register/phone/verify', {
  method: 'POST',
  headers: {
    'x-client-key': 'your-client-key',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    onboardingId: sessionStorage.getItem('onboardingId'),
    phoneCountryCode: '+44',
    phoneNumber: '7400846282',
    contactVerificationId: sessionStorage.getItem('contactVerificationId'),
    verificationCode: '123456'
  })
});

const { user } = await response.json();
console.log('Phone verified:', user.phoneNumber);

Next Steps

Update Personal Details

Add personal information to complete KYC