---
title: "Record Consent"
method: POST
path: "/v1/consents"
tags: ["consents"]
---

# Record Consent

`POST /v1/consents`

## Request

- Base URL: `https://api.4chems.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.4chems.com/v1/consents`
- Auth: HTTP bearer

Record acceptance of a legal document version and return the entry; call this
only after showing the user the document URL and version and receiving an
explicit affirmative answer.

Without `tenant_id` it records the caller's own consent; with `tenant_id` it
records on behalf of that tenant and needs level owner. Idempotent for an
already-recorded document+version pair, which returns the existing record with
a 200 instead of creating a duplicate.

## Request body

- ConsentIn
  - `document_code` string, required
  - `document_version` string, required
  - `tenant_id` string, uuid, nullable: Record on behalf of this tenant (needs level owner). Omit to record the caller's own consent.

## Response `201`

Successful Response

- ConsentOut
  - `id` string, uuid, required
  - `subject_sub` string, required
  - `tenant_id` string, uuid, nullable
  - `document_code` string, required
  - `document_version` string, required
  - `granted_at` string, date-time, required
  - `source` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/4chems/apis/platform-api.md) · [All operations](https://skmtc.dev/4chems/apis/platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/4chems/apis/platform-api/revisions/65e4f7b4dba0?raw)
