const response = await fetch('https://dev.api.baanx.com/v1/auth/register/email/verify', {
method: 'POST',
headers: {
'x-client-key': 'your-client-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
email: '[email protected]',
password: 'SecurePassword123!',
verificationCode: '123456',
contactVerificationId: sessionStorage.getItem('contactVerificationId'),
countryOfResidence: 'GB',
allowMarketing: true,
allowSms: true
})
});
const { onboardingId, user } = await response.json();
sessionStorage.setItem('onboardingId', onboardingId);
console.log('Account created, continue onboarding');