A valid request URL is required to generate request examples{
"document": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"title": "<string>",
"enforcement": "required",
"archived_at": "2023-11-07T05:31:56Z",
"segment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"versions": 123,
"acceptances": 123,
"current_version": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"summary": "<string>",
"effective_at": "2023-11-07T05:31:56Z",
"published_at": "2023-11-07T05:31:56Z",
"requires_reacceptance": true,
"acceptances": 123
},
"draft": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"summary": "<string>",
"requires_reacceptance": true,
"updated_at": "2023-11-07T05:31:56Z"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}Update a legal document
Requires legal:manage. Partial: an omitted field keeps its value. Nothing here touches any version — the words are edited and published on their own routes, and published ones cannot be edited at all.
archived: true takes the document out of circulation: it leaves the public document, it stops being asked of anybody, and every acceptance behind it is untouched. That is the way to withdraw terms, and it is why DELETE refuses a document that ever published anything.
Changing enforcement from optional to required marks everybody who has not agreed as blocking on the reads that report outstanding agreements, on the next request. It signs nobody out — what to do about an outstanding agreement is your product’s decision.
A valid request URL is required to generate request examples{
"document": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"title": "<string>",
"enforcement": "required",
"archived_at": "2023-11-07T05:31:56Z",
"segment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"versions": 123,
"acceptances": 123,
"current_version": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"summary": "<string>",
"effective_at": "2023-11-07T05:31:56Z",
"published_at": "2023-11-07T05:31:56Z",
"requires_reacceptance": true,
"acceptances": 123
},
"draft": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"summary": "<string>",
"requires_reacceptance": true,
"updated_at": "2023-11-07T05:31:56Z"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}Authorizations
Headers
The organization the caller is acting on — the org_… code that appears in the panel URL. It identifies; the membership JOIN is what authorizes, so a forged code reads nothing: the answer is not_a_member (403), which does not mean the session is over. Absent, the session's default organization answers, or — if that membership was revoked while the session was open — any other one the caller still holds.
Body
Creating or editing a document. On PATCH, an omitted field keeps its value.
Aims an OPTIONAL document at a segment; null is everybody. A required document may not be aimed, and the pair is checked together — making an aimed document required is refused exactly as aiming a required one is, with required_cannot_be_aimed. The reason is that a term is evidence rather than delivery: a required document is a condition of use rather than a delivery, a pending obligation would evaporate when somebody's attributes changed, and "prove this customer agreed" would become "prove they did not have to" — an answer depending on a past segment membership nothing here versions. An optional document is an offer, so none of that applies: leaving the segment stops the offer and cannot un-agree what was agreed.