# Update terms and conditions consent

Canonical page: https://docs.ovok.com/slim-apis/user/update-terms-and-conditions-consent

| Method | Path |
| --- | --- |
| `POST` | `/v1/slim/user/terms-and-conditions-consent` |

[Authentication](/authentication) · [Access policies](/access-policies)

Accepts or withdraws the terms and conditions for the signed-in practitioner. Other consents are not changed.

**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` (project admins skip this check).
**Scope:** The caller's practitioner profile in the caller's project (from the token).

## Request [#request]

### Body [#body]

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `termsAndConditionsConsent` | `boolean` | Yes | `true` accepts the currently published terms. `false` withdraws the acceptance. `null` and other types are refused. |

```json
{
  "termsAndConditionsConsent": true
}
```

## Behaviour [#behaviour]

- `true` records acceptance of the currently published terms version. `false` withdraws it.
- The acceptance is also kept as a legal `Consent` in your project: accepting creates or re-activates it with a link to the terms page of your project's practitioner app; withdrawing revokes it with reason `withdrawn`.
- Repeating the same value writes nothing. The call is idempotent.
- The consent answers of `/v1/me/consent/*` are refreshed right away.
- Returns the resulting `termsAndConditionsConsent`.


## Example [#example]

```bash
curl -X POST 'https://api.sandbox.ovok.com/v1/slim/user/terms-and-conditions-consent' \
  -H "Authorization: Bearer ${OVOK_TOKEN}" \
  -H 'Content-Type: application/json' \
  -d '{ "termsAndConditionsConsent": true }'
```

## Successful response [#successful-response]

`201` — Terms and conditions consent updated successfully.

```json
{
  "termsAndConditionsConsent": true
}
```

| Field | Type | Description |
| --- | --- | --- |
| `termsAndConditionsConsent` | `boolean` | The resulting state: the value you sent. |

## Errors [#errors]

| Status | Meaning |
| --- | --- |
| [`400`](/errors/malformed-request) | The FHIR server refused the consent write. |
| [`401`](/errors/unauthenticated) | The bearer token is missing or invalid. |
| [`403`](/errors/forbidden) | The session is not a practitioner session, has no project, or its access policy lacks one of the `Consent` interactions. |
| [`409`](/errors/conflict) | The consent write lost a [`conflict`](/errors/conflict) with a concurrent write. Retry. |
| [`422`](/errors/validation-failed) | The body fails validation, for example `termsAndConditionsConsent` is missing or not a boolean. |
| [`500`](/errors/internal-error) | The write failed unexpectedly, or failed and could not be fully rolled back. |
| [`503`](/errors/service-unavailable) | Your access policy could not be read, or the service is temporarily over capacity. Retry shortly, and honour `Retry-After` when it is present. |
