# RELATED_PERSON_INVITATION_ENABLED

Canonical page: https://docs.ovok.com/settings-and-features/settings/related-person-invitation-enabled

Controls whether patients can [share readings with a carer](/invitations/share-with-a-carer). It gates **both** sending a carer invite and accepting one, so it is also what stops new carer accounts.

| | |
| --- | --- |
| Type | Boolean setting |
| Change with | `PUT /v1/project/settings/RELATED_PERSON_INVITATION_ENABLED` |
| Who can change it | Project admin |
| When unset | Carer invitations are **on**. `GET /v1/project/settings` reports `false` in `settings`, `null` in `overrides` and `true` in `effectiveSettings`. |
| Set on new projects | `false` for child projects created with `POST /v1/slim/project/child`; not set by any other project-creation route |
| Needs | Patient sharing on (`enabled` on [`PUT /v1/patient-sharing/settings`](/settings-and-features/settings/patient-sharing-enabled), off by default) and a [patient app URL](/settings-and-features/settings/patient-app-url) |
| Inherited | The switch is not. The app URL can fall back to the parent project. |

No default AccessPolicy is needed: Ovok creates the carer's built-in policy itself.

## Turn carer invitations off [#turn-carer-invitations-off]

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

## Where the switch applies [#where-the-switch-applies]

| Route | Who calls it | When off |
| --- | --- | --- |
| [`POST /v1/invites/record-share`](/invitations/share-with-a-carer#step-1-invite) with `"recipient": "related-person"` | A patient | `403` `Invitation is not enabled for this project.` Nothing is written or sent. |
| [`POST /v1/invites/record-share/accept`](/invitations/share-with-a-carer#step-2-accept) for a carer invite | The carer, or a new address | `403` `Invitation is not enabled for this project.` No account is made. |

It does not apply to `"recipient": "practitioner"`, which answers to [`PRACTITIONER_INVITATION_ENABLED`](/settings-and-features/settings/practitioner-invitation-enabled).

## Order of the checks [#order-of-the-checks]

On invite, patient sharing is checked first (`403` `Sharing is not enabled for this project.`), then this switch, then the patient app URL (`409` `code` [`app_url_not_configured`](/errors/app-url-not-configured)). On accept, this switch is checked as soon as the invite is found, before the code.

## Gotchas [#gotchas]

- **Pending invites stop working too.** An invite sent while the switch was on answers `403` when it is accepted after you turn it off. Turning it back on within the invite's 7 days makes it usable again.
- **Existing shares are not touched.** Carers who already have access keep it until the patient ends the share. To stop carers signing in, use [`RELATED_PERSON_LOGIN_ENABLED`](/settings-and-features/settings/related-person-login-enabled).
- **On by default, but patient sharing is off by default.** A new project cannot invite carers until an admin turns patient sharing on.
- **Projects created with `POST /v1/slim/project/child` start with it off.**

## Related [#related]

- [Share readings with a carer](/invitations/share-with-a-carer), the routes this switch gates
- [Carers](/authentication/carers)
- [RELATED_PERSON_LOGIN_ENABLED](/settings-and-features/settings/related-person-login-enabled)
- [PATIENT_SHARING_ENABLED](/settings-and-features/settings/patient-sharing-enabled)
