Settings

PATIENT_REGISTRATION_ENABLED

Let patients create their own account, what the project must have in place first, and the sign-up paths the switch does not cover.

Controls whether patients can create their own account in the project. Turn it off for invitation-only patient onboarding.

TypeBoolean setting
Change withPUT /v1/project/settings/PATIENT_REGISTRATION_ENABLED
Who can change itProject admin
When unsetRegistration is on if the project has a default patient AccessPolicy, although GET /v1/project/settings reports false
Set on new projectsfalse for child projects created with POST /v1/slim/project/child; not set by any other project-creation route
NeedsDEFAULT_PATIENT_ACCESS_POLICY
InheritedNo. A child project reads only its own value and its own default patient AccessPolicy.

Turn patient registration off

curl --request PUT \
  --url 'https://api.sandbox.ovok.com/v1/project/settings/PATIENT_REGISTRATION_ENABLED' \
  --header "Authorization: Bearer ${OVOK_TOKEN}" \
  --header 'Content-Type: application/json' \
  --data '{"enabled":false}'

What registration needs

A patient who registers gets the project's default patient AccessPolicy. Without one, registration is refused whatever this switch says. Set it with DEFAULT_PATIENT_ACCESS_POLICY; no project-creation route sets it for you.

Where the switch applies

RouteChecked?
POST /v1/auth/tenant/Patient/registerYes
POST /auth/signup with resourceType Patient (deprecated)Yes
First sign-in with Google or AppleNo
POST /auth/invite with type PatientNo. See PATIENT_INVITATION_ENABLED.

What callers see

POST /v1/auth/tenant/Patient/register runs its checks in this order:

OrderConditionStatusMessage
1Too many requests (5 per minute per client address)429
2Unknown tenant code404Tenant not found.
3The project has no default patient AccessPolicy403Registration is not enabled for this project.
4The switch is off403Registration is not enabled for this project.
5A patient with this email already exists in the project400Registration failed.

On success the response contains tokens, so the new patient is signed in immediately.

Business-email sign-ups

When CLINICIAN_INVITE_ON_BUSINESS_EMAIL is on, a patient registration with a business address creates a practitioner invitation instead of a patient and returns {"nextStep":"clinician-invite"} with no tokens. If the project cannot send that invitation, the person is registered as a patient, silently.

Gotchas

  • Off and "not configured" look the same. Steps 3 and 4 return the same 403 and message. If you did not turn the switch off, check the default patient AccessPolicy first.

  • GET shows false for a project that has never set it, but registration works whenever the AccessPolicy exists. Set the key to the value you intend.

  • Projects created with POST /v1/slim/project/child start with it off, and have no default patient AccessPolicy until someone sets one.

  • Turning it off is not enough to stop patient sign-up. Two other routes create patients: POST /auth/invite (no sign-in required, while PATIENT_INVITATION_ENABLED is on) and first-time Google or Apple sign-in. Turn the invitation switch off too, and test social sign-in if your app offers it.

  • A successful registration returns tokens even when PATIENT_LOGIN_ENABLED is false.

  • Social sign-up uses the project's default patient AccessPolicy. Older affected social-sign-in memberships were backfilled where a usable default policy existed. Review legacy memberships in projects without a default policy before relying on patient scoping.

  • Every error is padded to at least one second, so do not treat a slow failure as an outage.

  • A welcome email goes out only if PATIENT_WELCOME is mapped. A new patient receives nothing otherwise. See Email templates.

Last updated on

On this page