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

# Update Mailing Address

> Submit mailing address for US residents to complete registration

## Overview

Submit mailing address for US residents. This is the final step in the registration process for US users who have a different mailing address than their physical address.

After successful submission, an access token is returned and registration is complete.

<Note>
  This endpoint is **only for US residents** with different mailing addresses. Non-US residents complete registration at the physical address step.
</Note>

## Request

### Body

<ParamField body="onboardingId" type="string" required>
  Onboarding ID from previous step
</ParamField>

<ParamField body="addressLine1" type="string" required>
  Primary mailing address line

  **Example**: `23 Werrington Bridge Rd`
</ParamField>

<ParamField body="addressLine2" type="string">
  Secondary address line (optional)

  **Example**: `Milking Nook`
</ParamField>

<ParamField body="city" type="string" required>
  City name

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

<ParamField body="zip" type="string" required>
  ZIP code

  **Example**: `PE6 7PP`
</ParamField>

<ParamField body="usState" type="string" required>
  US state postal abbreviation

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

## Response

<ResponseField name="accessToken" type="string">
  Access token for authenticated API requests

  Registration is now complete

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

<ResponseField name="onboardingId" type="string">
  Final onboarding ID
</ResponseField>

<ResponseField name="user" type="object">
  Complete user object with all details
</ResponseField>

## Code Examples

<CodeGroup>
  ```javascript JavaScript theme={null}
  const response = await fetch('https://dev.api.baanx.com/v1/auth/register/mailing-address', {
    method: 'POST',
    headers: {
      'x-client-key': 'your-client-key',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      onboardingId: sessionStorage.getItem('onboardingId'),
      addressLine1: 'PO Box 123',
      city: 'New York',
      zip: '10001',
      usState: 'NY'
    })
  });

  const { accessToken, user } = await response.json();

  // Registration complete!
  localStorage.setItem('access_token', accessToken);
  console.log('Registration complete!', user);

  // Redirect to dashboard
  window.location.href = '/dashboard';
  ```
</CodeGroup>

<Tip>
  After receiving the access token, store it securely and redirect the user to your main application.
</Tip>

## Registration Complete

At this point, the user has completed all registration steps:

1. Email verification
2. Phone verification
3. Personal details
4. Physical address
5. Mailing address (US only)

The user can now access all authenticated endpoints using the access token.

## Next Steps

<CardGroup cols={2}>
  <Card title="Get User Profile" icon="user" href="/api-reference/user/get-user">
    Fetch complete user profile
  </Card>

  <Card title="View Card Status" icon="credit-card" href="/api-reference/card/status">
    Access user's card information
  </Card>
</CardGroup>
