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
A staff session token, uk_st_…. Minted by sign-up, sign-in or the two-factor exchange. Only a 401 means it is spent; not_a_member (403) is about the organization named in X-Organization-Id and leaves the token good for the others.
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.
Path Parameters
Body
Creating or editing a document. On PATCH, an omitted field keeps its value.
Lowercase letters, digits, hyphens and underscores. Refused rather than normalised — it is typed twice, here and in your own markup.
At most 160 characters.
Defaults to required on creation.
required, optional true withdraws the document; false puts it back in circulation. This is how terms are taken down — DELETE refuses a document that ever published anything.
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.
Response
The document as it now stands.
One of your terms: a name, an address, and a rule about whether agreeing is required. The words are versions of it.
Show child attributes
Show child attributes