2. Create User Onboarding

Next, create a User Onboarding. For KYC, the party_type should be individual. When KYB functionality exists, there will be a business type.

There are optional fields for verified_email and verified_phone, where you can enter an email address or phone number that you have verified previously with the user. Phone numbers should include the country code (e.g. +1 for US-based phone numbers) and be formatted without spaces (e.g. +11234567890). This data will be compared against what the user enters and is a signal for the KYC checks.

curl --request POST \
  -u ORGANIZATION_ID:API_KEY \
  --url https://app.moderntreasury.com/api/user_onboardings \
  -H 'Content-Type: application/json' \
  -d '{
    "party_type": "individual",
}'
curl --request POST \
  -u ORGANIZATION_ID:API_KEY \
  --url https://app.moderntreasury.com/api/user_onboardings \
  -H 'Content-Type: application/json' \
  -d '{
    "party_type": "individual",
    "verified_email": "[email protected]",
    "verified_phone": "+12223334444"
}'

This API request will return a User Onboarding object. The id is used in future steps.

{
  "id": "dacabe14-4b1b-4219-8226-02b3d247477d",
  "object": "user_onboarding",
  "live_mode": true,
  "metadata": {},
  "party_type": "individual",
  "status": "pending",
  "verified_phone": "[email protected]",
  "verified_email": "+12223334444",
  "counterparty_id": null,
  "decision_id": null,
  "created_at": "2022-05-24T02:45:08Z",
  "updated_at": "2022-05-24T02:45:08Z"
}

🚧

Warning

Be careful not to share your API key with your frontend, as it is private. Create User Onboarding objects in your backend only.


What’s Next
Did this page help you?