Start a session
Start one session per applicant. Thetemplate_id is the journey’s ID, the last part of its URL in Console:
reference_id is your own identifier for the applicant; it comes back on the session, its results and its webhook. The response carries the session’s id, an embed_url, the session_token already embedded in it, expires_at (when the link stops working) and your reference_id. A journey that was never published answers 409.
Retrying the call starts a second session rather than returning the first; use reference_id to tell them apart.
Show it to the applicant
Openembed_url in an iframe inside your product:
Receive the outcome
When the applicant finishes and the checks complete, Baselayer sends theOnboardingSession.completed webhook. It is a summary, not the full results:
Rarely, the webhook goes out late, after a reviewer has already decided the session;
verdict then carries that decision, which can be REJECTED. Treat the results as the source of truth.
Then read the session’s results with GET /onboarding/sessions/{id}/results. They carry the verdict, what the applicant entered (including your custom fields), their confirmed identity, the business, beneficial owners, and what each check found. A session that hasn’t completed answers 409 with error code 6007, and a completed session whose results aren’t available answers 404 with error code 6008.