# Update a legal term

`PATCH https://api.cademi.com.br/api/v3/legal-terms/{legal_term_id}`

Operation ID: `legal_terms.update` · API v3

Replaces the body of a legal term. Setting `body` to `null` removes the legal term; subsequent requests for it return `404`.

Changing the text does not invalidate acceptances already recorded, and users are not asked to accept the term again.

Send the `ETag` returned by the retrieve operation in the `If-Match` header to avoid overwriting a newer version. Legal terms of replicated accounts and replicated products are read-only.

Required permissions: `legal_terms.update`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `legal_term_id` | path | string | yes |  |
| `If-Match` | header | string | no |  |

## Request body

Content type: `application/json`, required.

| Field | Type | Required | Description |
|---|---|---|---|
| `body` | object or null | yes |  |

## Responses

### 200

Returns the updated legal term. When the term was removed, returns its state immediately before removal.

Body: `data`: LegalTerm.

Fields of LegalTerm:

| Field | Type | Required | Description |
|---|---|---|---|
| `acceptances_count` | integer | yes |  |
| `body` | object | no | Content of the legal terms as an Editor.js document. Returned only when retrieving a single legal term. |
| `id` | string | yes | Public ID derived from the scope: trmplatform, or trmproduct_<n>, where <n> is the numeric part of the product's public ID. |
| `object` | string, one of `legal_term` | yes |  |
| `product_id` | string or null | yes | Public ID of the product, prefixed with prd_. null for the platform scope. |
| `revision` | string | yes |  |
| `scope` | string, one of `platform`, `product` | yes |  |
| `title` | string | yes | Derived from the scope: the account name for the platform scope, or the product name for the product scope. |
| `updated_at` | string (date-time) | yes |  |

### 401

The credential is missing, malformed, expired, or revoked.

Body: Error.

### 403

The current credentials do not have the permission required by this operation.

Body: Error.

### 404

The legal term was not found or is not accessible with the current credentials.

Body: Error.

### 412

The legal term has changed since the supplied revision was retrieved.

Body: Error.

### 422

The request body or query parameters failed validation.

Body: ValidationFailed.

Full schema: https://cademi.dev/openapi/v3.json
