> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baanx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Verify Phone Code

> Verify SMS code and update user onboarding with phone number

## 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

<ParamField body="onboardingId" type="string" required>
  Onboarding ID from email verification

  **Example**: `US_100a99cf-f4d3-4fa1-c123-2e9833440ebb`
</ParamField>

<ParamField body="phoneCountryCode" type="string" required>
  Phone country calling code

  **Example**: `+44`
</ParamField>

<ParamField body="phoneNumber" type="string" required>
  Phone number without country code

  **Example**: `7400846282`
</ParamField>

<ParamField body="contactVerificationId" type="string" required>
  Verification ID from email send step

  **Example**: `US_100a99cf-f4d3-4fa1-9be9-2e9828b20ebb`
</ParamField>

<ParamField body="verificationCode" type="string" required>
  6-digit code received via SMS

  **Example**: `123456`
</ParamField>

## Response

<ResponseField name="onboardingId" type="string">
  Updated onboarding ID

  **Example**: `US_100a99cf-f4d3-4fa1-c123-2e9833440ebb`
</ResponseField>

<ResponseField name="user" type="object">
  Updated user object with verified phone number
</ResponseField>

## Code Examples

<CodeGroup>
  ```javascript JavaScript theme={null}
  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);
  ```
</CodeGroup>

## Next Steps

<Card title="Update Personal Details" href="/api-reference/auth/register-personal-details">
  Add personal information to complete KYC
</Card>
