Skip to main content
POST
/
v1
/
auth
/
register
/
mailing-address
{
  "accessToken": "<string>",
  "onboardingId": "<string>",
  "user": {}
}

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.
This endpoint is only for US residents with different mailing addresses. Non-US residents complete registration at the physical address step.

Request

Body

onboardingId
string
required
Onboarding ID from previous step
addressLine1
string
required
Primary mailing address lineExample: 23 Werrington Bridge Rd
addressLine2
string
Secondary address line (optional)Example: Milking Nook
city
string
required
City nameExample: Peterborough
zip
string
required
ZIP codeExample: PE6 7PP
usState
string
required
US state postal abbreviationExample: CA

Response

accessToken
string
Access token for authenticated API requestsRegistration is now completeExample: US_100a99cf-f4d3-4fa1-c321-2e9833440ebb
onboardingId
string
Final onboarding ID
user
object
Complete user object with all details

Code Examples

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';
After receiving the access token, store it securely and redirect the user to your main application.

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