Accept legal documents
Records that the authenticated user accepts the given document versions. document_ids must match the currently active set exactly. A missing or superseded id is rejected so a stale client cannot accept the wrong documents. Writes one ledger row per document, all sharing a timestamp, IP and user-agent. Idempotent: re-accepting a document keeps its original acceptance date.
https://api.omnifence.ai/api/v1/me/terms/acceptRecords the authenticated user's acceptance of the legal documents currently in force.
document_ids must match the active set exactly. A missing id, or one that has since been superseded, is rejected with a 400. This stops a page that was loaded before a new version went live from recording an acceptance of the wrong documents. Re-fetch the document list and submit every document_id it returns.
One ledger row is written per document, all sharing a timestamp, IP address and user-agent. Accepting is idempotent: a document the user already agreed to keeps its original acceptance date.
Session auth only. This endpoint is not usable with an API key.
Request#
Headers#
| Name | Type | Required | Description |
|---|---|---|---|
Authorization |
string | Yes | Your API key as a Bearer token: Bearer YOUR_API_KEY. |
Body (application/json)#
| Field | Type | Required | Description |
|---|---|---|---|
document_ids |
array of string | Yes |
{
"document_ids": [
"string"
]
}
Responses#
200 OK#
| Field | Type | Always present | Description |
|---|---|---|---|
accepted |
boolean | Yes | |
accepted_at |
string (date-time) | Yes | |
documents |
array of object | Yes | |
documents[].document_id |
string | Yes | |
documents[].document_key |
string | Yes | |
documents[].version |
integer | Yes | |
documents[].accepted_at |
string (date-time) | Yes |
{
"accepted": false,
"accepted_at": "2026-05-19T12:00:00.000Z",
"documents": [
{
"document_id": "string",
"document_key": "string",
"version": 0,
"accepted_at": "2026-05-19T12:00:00.000Z"
}
]
}