principal_ref (and business_ref, if a business is involved), against which credentials can be minted.
Using Baselayer’s hosted verification flow lets you complete consumer verification using the consumer’s name and phone number, and business verification using the business’s registered name and address. For individuals acting as an authorized representative of a business, Baselayer also validates the authority of the individual to act on behalf of the business.
Before you start
You need an org API key with identity submission permissions. Direct submission requires you to have already collected the person’s full legal name, DOB, phone number, address, and SSN. An incomplete identity can never earn aprincipal_ref. Hosted enrollment requires only a template configured for your org (see Path B below); the user supplies the rest.Choosing a path
Path A: Submit an identity you already collected
- Submit.
POST /identity_submissions/consumer(person only) orPOST /identity_submissions/consumer_business(person + the business they operate). Both return202with asubmission_idimmediately — verification runs asynchronously. - Poll or subscribe.
GET /identity_submissions/{submission_id}untilstateis terminal, or subscribe to theOnboardingSession.completedwebhook. Recommended: poll every 2 seconds; consumer KYC usually completes in seconds, a full KYB pipeline can take minutes. - Read the verdict.
APPROVED,UNDER_REVIEW, orREJECTED, plus the resultingprincipal_ref(andbusiness_ref/business_operator_link_status, for a consumer+business submission).
idempotency_key — resubmitting the same key returns the original submission rather than starting a second verification.
Path B: Use the hosted enrollment interface
- Pick a template (optional).
GET /onboarding/templateslists the flows configured for your org. - Mint a session.
POST /onboarding/sessionswith atemplate_idreturns anembed_urland a one-timesession_token. Render the URL in an iframe, or redirect the applicant to it. - The applicant completes the flow inside Baselayer’s hosted UI — you don’t call its internal steps yourself.
- Learn the outcome the same way as Path A: poll
GET /identity_submissions/{id}(the session’sidis thesubmission_id) or receive the webhook.
Re-verifying an identity
POST /identities/principals/{principal_ref}/reverify starts a fresh verification cycle against the identity’s most recent submitted attributes — the principal_ref never changes. Use this instead of a fresh submission when an identity has expired.
Checking an identity before minting
GET /identities/principals/{principal_ref} tells you whether an identity is current (verification_state: CURRENT), which attributes it can attest to (active_keys), and which businesses a person is linked to (where applicable).