# Create a legal term

`POST https://api.cademi.com.br/api/v3/legal-terms`

Operation ID: `legal_terms.create` · API v3

Configures the legal term for a scope. There is at most one legal term for the platform and one per product, and legal terms are not versioned.

The `product` scope requires `product_id`. If the scope already has a legal term, the request is rejected; use the update operation to change its text.

Legal terms of replicated accounts and replicated products are read-only.

Required permissions: `legal_terms.create`.

## Request body

Content type: `application/json`, required.

| Field | Type | Required | Description |
|---|---|---|---|
| `body` | object | yes |  |
| `product_id` | string or null | no |  |
| `scope` | string, one of `platform`, `product` | yes |  |

## Responses

### 201

Returns the newly created legal term.

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 product was not found or is not accessible with the current credentials.

Body: Error.

### 409

The scope already has a legal term. Returns the already_exists error code.

Body: Error.

### 422

The request body or query parameters failed validation.

Body: ValidationFailed.

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