DEFAULT_PRACTITIONER_ACCESS_POLICY
The AccessPolicy that a new practitioner receives when Ovok creates their account on your behalf: through self-registration, a business-email sign-up, or one of the invitation routes.
| Type | Text setting |
| Change with | PUT /v1/project/settings/values/DEFAULT_PRACTITIONER_ACCESS_POLICY |
| Value | AccessPolicy/<id> of an AccessPolicy in this project, or null to remove it |
| Who can change it | Project admin |
| When unset | Routes that need it refuse with 409; others create the practitioner without a policy |
| Set on new projects | Not set by any project-creation route |
| Inherited | No. A child project reads only its own value. |
Why it exists
A project membership with no AccessPolicy is not limited by one. For that reason Ovok will not create a practitioner without a policy where it can avoid it: registration, business-email sign-up and the patient and practitioner invitations all refuse until this setting resolves to a valid policy. Set it once, to a policy that holds only what a brand-new practitioner should be able to do.
Set it
curl --request PUT \
--url 'https://api.sandbox.ovok.com/v1/project/settings/values/DEFAULT_PRACTITIONER_ACCESS_POLICY' \
--header "Authorization: Bearer ${OVOK_TOKEN}" \
--header 'Content-Type: application/json' \
--data '{"value":"AccessPolicy/practitioner-policy-id"}'
The response is the full settings record; the value appears under values. Send {"value":null} to remove it.
| Response | Meaning |
|---|---|
422 with code INVALID_SETTING_VALUE | The value is not AccessPolicy/<id>, no such policy exists, or the policy belongs to another project. |
400 with code UNKNOWN_SETTING | The key is misspelled. The body lists acceptedKeys. |
403 | The caller is not a project admin. |
409 | The project changed during the write. Read the settings again and retry. |
The check is strict on purpose: a policy from another project is never accepted, so a setting cannot grant access that the project does not own.
Where Ovok reads it
| Route | What it does with the policy | When it is missing or invalid |
|---|---|---|
POST /auth/tenant/Practitioner/register | Gives it to the new practitioner. | 409, error practitioner_registration_not_configured |
POST /auth/tenant/Patient/register with business-email sign-ups on | Gives it to the invited clinician. | Falls back to a normal patient registration, silently. |
POST /v1/invites/practitioner and /accept | Gives it to the invited practitioner. | 409, error invitation_not_configured |
POST /v1/projects/me/members | Uses it as the base policy when the request carries access entries. | 409, error invitation_not_configured, only when access is sent |
Two invitation routes do not read it:
POST /auth/invitewithtypePractitionercreates a practitioner with no AccessPolicy.POST /v1/slim/invite/practitioneruses theaccessPolicyIdyou send in the request.
Gotchas
- A parent's policy id does not work in a child project. Creating a child with
POST /v1/slim/project/childcopies the parent's AccessPolicies under new ids. Read the child's own policies and use those ids. - Changing it does not touch practitioners who already have an account. It applies to practitioners created afterwards.
- A set but broken value does not fall back. If the policy is deleted or cannot be read, routes behave as if the setting were unset. They do not try the older setting below.
- The reader is more forgiving than the writer. Ovok will read a bare id that was stored by hand, but
PUTrequires theAccessPolicy/prefix. - Error identifiers are not in one field.
practitioner_registration_not_configuredandinvitation_not_configuredare inerror;INVALID_SETTING_VALUEandUNKNOWN_SETTINGare incode.
Older setting: CLINICIAN_INVITE_ACCESS_POLICY
Projects that configured clinician invitations before this setting existed may have CLINICIAN_INVITE_ACCESS_POLICY. Ovok uses it only when DEFAULT_PRACTITIONER_ACCESS_POLICY is absent or blank. It is written the same way (PUT /v1/project/settings/values/CLINICIAN_INVITE_ACCESS_POLICY) and follows the same validation. New integrations should set only DEFAULT_PRACTITIONER_ACCESS_POLICY.
Business-email sign-ups
With CLINICIAN_INVITE_ON_BUSINESS_EMAIL on, a patient registration with a work email invites that person as a practitioner and gives them this policy. If the policy is missing or invalid the invitation does not go out and the person is registered as a patient, silently. See that page for the full list of requirements.