Skip to main content
Enrollment is the moment the employer commits: you lock their selection against a quote, and Prescience provisions the company and runs onboarding with them directly. It is your last required API call in the launch flow.

Create an enrollment

Always send an Idempotency-Key on enrollment; it’s the one call you really don’t want duplicated on a network retry. Replays within 24 hours return the stored response.

Onboarding pathways

Hosted (default)

With onboardingMode: "hosted", all post-enrollment onboarding runs in the Prescience employer portal. At enrollment, Prescience provisions the signatory as an employer portal admin for the company; in live mode they receive a set-password invite email pointing at the portal sign-in. Prescience then runs onboarding, KYB, banking, and plan setup with the employer directly. Your integration tracks progress by polling GET /enrollments/{enrollmentId} or listening to webhooks; there is nothing for you to render beyond status. The response reports what was provisioned in the employerPortal object:

Embedded

Embedded onboarding keeps onboarding forms, document e-signature, and banking capture inside your own UI. It is separate from the core hosted flow and is enabled per integration.

Validations

Each check has a distinct failure mode: Details on enrollment-readiness in the census guide.

What happens when you POST

All of it synchronous with the 201:
  1. Provisions the company for group.domain in sandbox state, with the signatory as admin.
  2. Materializes the census into live plan records: members and dependents, upserted by email.
  3. Provisions the signatory’s portal account (hosted pathway) and, in live mode, sends the set-password invite. Test mode provisions without sending email.
  4. Moves the group to enrolled and fires the enrollment.created webhook.
  5. Starts the onboarding pipeline. The human side begins here.

The Enrollment object

Response (201)
This example is a test-mode enrollment, so inviteSuppressed is true: the portal account exists, but no email went out.

Track onboarding to activation

The company starts in sandbox: fully configured, no money moving. Prescience runs onboarding with the employer (kickoff call, KYB, plan setup in the portal) and then flips the company to prod. That flip is a manual gate on our side; it is what makes the plan real. Track progress two ways:
  • Poll GET /groups/{groupId}/enrollments/{enrollmentId}: onboarding.percentComplete and blockingRemaining are recomputed from the live onboarding checklist on every read.
  • Listen for group.state_changed, fired on sandbox → prod with the old and new state.
When the company reaches prod, enrollment.status becomes active, group.status becomes active, and the benefits tab starts showing real funding and spend. In test mode the pipeline behaves identically except the final flip: test companies are flagged test: true and are never moved to prod. See Environments.

What you build vs what you don’t

The integration’s job ends at the POST. Ours begins there.