MeMe/Consent

Accept or withdraw the terms

  • Sandbox: available
  • Staging: available
  • Production: unknown
POST
/v1/me/consent/legal

Accepts or withdraws the terms for the signed-in practitioner and returns the resulting legal consent.

Auth: Bearer token for a practitioner session (the profile must be a Practitioner). The caller's access policy must grant Consent:read, Consent:search, Consent:create and Consent:update (a project admin who holds no access policy skips this check). Scope: The caller's practitioner profile in the caller's project (from the token).

Behaviour

  • termsAndConditionsConsent: true records acceptance of the currently published terms. It creates the legal consent, or re-activates a revoked one, with a link to the terms page of your project's practitioner app and the time of acceptance.
  • termsAndConditionsConsent: false revokes an active legal consent with revokedReason: "withdrawn". With no active consent it changes nothing.
  • Accepting again on the same terms version writes nothing.
  • The terms value read by GET /v1/slim/user/consents changes in the same commit. Other consents are not changed.
  • The response has the shape of GET /v1/me/consent/legal.

Example

curl -X POST 'https://api.sandbox.ovok.com/v1/me/consent/legal' \  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \  -H 'Content-Type: application/json' \  -d '{ "termsAndConditionsConsent": true }'

Authorization

bearer
headerAuthorizationBearer <JWT>

Request Body

application/json
  1. body
termsAndConditionsConsent*boolean

Response Body

Legal consent updated successfully.

application/json
  1. response
legal*
Example Request
curl -X POST 'https://api.sandbox.ovok.com/v1/me/consent/legal' \  -H 'Content-Type: application/json' \  -d '{  "termsAndConditionsConsent": true}'
Example Response
{  "legal": {    "consentId": "string",    "status": "active",    "termsUrl": "string",    "termsUpdatedAt": "string",    "acceptedAt": "string",    "revokedAt": "string",    "revokedReason": "tos-updated"  }}

Get legal consent GET

Returns the signed-in practitioner's legal consent: which terms they accepted, when, and whether the acceptance is still active. Use it on app load to decide whether to ask for the terms again. **Auth:** Bearer token for a practitioner session (the profile must be a `Practitioner`). The caller's access policy must grant `Consent:read` and `Consent:search` (a project admin who holds no access policy skips this check). **Scope:** The caller's practitioner profile in the caller's project (from the token). ## Behaviour - `legal` is `null` when the practitioner has never accepted the terms in this project. - `status` is `active` or `revoked`. Publishing new terms revokes every acceptance on an older version with `revokedReason: "tos-updated"`; withdrawing revokes it with `revokedReason: "withdrawn"`. Both reasons are `null` while the consent is active. - `revokedAt` is when the revoke happened, or for `tos-updated` when the new terms were published. - `termsUrl` is the terms page the practitioner accepted. It is `null` unless it is an `http(s)` URL or an app-relative path. - `termsUpdatedAt` is when the accepted terms were last updated, `null` when that is not known. - The published terms version is the one of the root project of your project tree: a child project follows its parent's terms. - Answers are cached for a rolling day. Any consent write by the practitioner and any publish of new terms refreshes them right away. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v1/me/consent/legal' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ``` ```json { "legal": { "consentId": "c3499c27-2973-0a7f-807e-fb8676a92dcb", "status": "revoked", "termsUrl": "https://app.example.com/legal/terms-and-conditions", "termsUpdatedAt": "2026-09-01T08:00:00.000Z", "acceptedAt": "2026-09-02T07:30:00.000Z", "revokedAt": "2026-10-01T09:00:00.000Z", "revokedReason": "tos-updated" } } ```

Get medical consent GET

Returns the signed-in practitioner's medical settings notifications consent, or `null` when it is not given. Use it on app load to decide whether to show the medical notifications prompt. **Auth:** Bearer token for a practitioner session (the profile must be a `Practitioner`). The caller's access policy must grant `Consent:read` and `Consent:search` (a project admin who holds no access policy skips this check). **Scope:** The caller's practitioner profile in the caller's project (from the token). ## Behaviour - `medical` is `null` when the practitioner never gave the consent or withdrew it. - Only withdrawing ends it. Unlike `GET /v1/slim/user/consents`, a newly published version does not turn it off here. - `acceptedAt` is when it was given, `null` when that is not recorded. - Answers are cached for a rolling day. Any consent write by the practitioner refreshes them right away. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/v1/me/consent/medical' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ``` ```json { "medical": { "consentId": "c3499c27-2973-0a7f-807e-fb8676a92dcb", "acceptedAt": "2026-09-02T07:30:00.000Z" } } ```