Skip to main content
This is the end-to-end developer path. Every example runs against the test-mode environment with test-scoped keys and synthetic data only. The request and response shapes shown here are the same ones generated into the API reference — they cannot drift from the live API.

Authenticate your requests

Server-to-server endpoints take a per-client API key as a bearer token and the brand context header:
The key resolves to exactly one client (your tenant); the brand must belong to that client. A foreign or unknown brand returns 404, and an authentication failure returns 401 with an opaque RFC 7807 body. Patient sign-in is separate — send patients to GET /v1/auth/login, scoped with the brand parameter, and complete it at the callback.

Start a patient with entry context

The entry-context parameters ride GET /v1/instrument/resolve. Every one of them is optional in the contract, and each one fails closed — but offering becomes required in practice for a brand with more than one enabled treatment, because without it the platform cannot tell which questionnaire to serve and will not guess:

Resolve the first question

offering takes a stable offering reference (the catalog code, for example SYN-TRZ-3M), never a free-text product name — an unresolvable value is dropped and the generic flow runs. The response is the current step. On the first call the server mints an enrollment id, returned as journey_id (prefixed jny_); send it back in the X-Journey-Id header on a return visit to resume the same session.

Submit an answer, get the next question

Send the answer for the question the session is on. The answer is re-validated on the server, and the session advances exactly one step.
A valid answer returns the next step. If the answer fails validation the response is 422 and the same question is re-presented with the problems in issues:
Repeat until status is complete. The client never decides completion — the server does, once every required answer is in.

Register a webhook and verify its signature

Register the endpoint that should receive events. The registration is scoped to your client and brand automatically — no request field chooses them.
The 201 response is the only message that ever carries the secret. Store secret immediately — it is never returned again.
Every delivery is authenticated with an HMAC computed from that secret. To verify a delivery, recompute the HMAC over the exact raw request body with your stored secret and compare it to the signature on the delivery in constant time; reject any delivery that does not match. Because the secret is shown only once, keep it somewhere your receiver can read at verification time. GET /v1/webhooks/event-types returns the catalog you can subscribe to, including which correlation id each event family carries.

Fire a test event

Before you go live, send a synthetic event through the same delivery and signing path:
The event is clearly marked as a test and carries synthetic identifiers. It is a single attempt with no retries, and the outcome is returned in the response — the fastest way to prove your receiver and your signature check work.

Test-mode semantics

A session started with test=true, and every event fired from a test call, is synthetic from end to end. Test enrollments are structurally excluded from settlement, reporting, and clinician-facing queues; a test session can never charge a real card or ship a real order. Production access is a separate, later step your onboarding contact owns — see Environments.