Get legal consent
- Sandbox: available
- Staging: available
- Production: unknown
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
legalisnullwhen the practitioner has never accepted the terms in this project.statusisactiveorrevoked. Publishing new terms revokes every acceptance on an older version withrevokedReason: "tos-updated"; withdrawing revokes it withrevokedReason: "withdrawn". Both reasons arenullwhile the consent is active.revokedAtis when the revoke happened, or fortos-updatedwhen the new terms were published.termsUrlis the terms page the practitioner accepted. It isnullunless it is anhttp(s)URL or an app-relative path.termsUpdatedAtis when the accepted terms were last updated,nullwhen 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
curl -X GET 'https://api.sandbox.ovok.com/v1/me/consent/legal' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'{ "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" }}bearerAuthorizationBearer <JWT>Legal consent retrieved successfully.
application/json- response
legal*curl -X GET 'https://api.sandbox.ovok.com/v1/me/consent/legal'{ "legal": { "consentId": "string", "status": "active", "termsUrl": "string", "termsUpdatedAt": "string", "acceptedAt": "string", "revokedAt": "string", "revokedReason": "tos-updated" }}MCP endpoint (POST only) DELETE
This MCP server is stateless: use POST.
Accept or withdraw the terms POST
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 ```bash 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 }' ```