Create onboarding
Initiates a new onboarding process for a client. Returns the onboarding_id that will be used in the following steps.
POST
/v1/onboardingsRequest
Headers
| Field | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Access token in Bearer ACCESS_TOKEN format |
Content-Type | string | Yes | Must be application/json |
Not applicable: Path Parameters, Query Parameters.
Body
| Field | Type | Required | Description |
|---|---|---|---|
company_type | string | Yes | Company for which the onboarding is being performed. Allowed values: ALLARIA, ALLARIAMAS |
onboarding_type | string | Yes | Onboarding type. Allowed values: INDIVIDUAL, BUSINESS |
Response
2XX Success
| Field | Type | Description |
|---|---|---|
onboarding_id | string (uuid) | Onboarding ID. Used for document upload, data submission, and status queries |
ttl | integer | Unix timestamp, in seconds, at which the onboarding expires — 60 days after it is created. It is an absolute instant, not a duration |
Error Codes
| Status | Description |
|---|---|
401 | Unauthorized — invalid or missing token |
403 | Forbidden — unauthorized client |
422 | Validation Error — submitted parameters are invalid |
500 | Internal Server Error — internal server error |
Code Example
- cURL
- JavaScript
- Python
- Node.js
curl -X POST "https://b2b.allaria.dev/v1/onboardings" \
-H "Authorization: Bearer ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"company_type": "ALLARIA",
"onboarding_type": "INDIVIDUAL"
}'
const response = await fetch('https://b2b.allaria.dev/v1/onboardings', {
method: 'POST',
headers: {
'Authorization': 'Bearer ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
company_type: 'ALLARIA',
onboarding_type: 'INDIVIDUAL'
})
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
'https://b2b.allaria.dev/v1/onboardings',
headers={
'Authorization': 'Bearer ACCESS_TOKEN',
'Content-Type': 'application/json'
},
json={
'company_type': 'ALLARIA',
'onboarding_type': 'INDIVIDUAL'
}
)
data = response.json()
print(data)
const axios = require('axios');
const response = await axios.post(
'https://b2b.allaria.dev/v1/onboardings',
{
company_type: 'ALLARIA',
onboarding_type: 'INDIVIDUAL'
},
{
headers: {
Authorization: 'Bearer ACCESS_TOKEN',
'Content-Type': 'application/json'
}
}
);
console.log(response.data);
2XX Success
{
"onboarding_id": "550e8400-e29b-41d4-a716-446655440000",
"ttl": 1773668700
}