Skip to main content
POST
Error

Authorizations

Authorization
string
header
required

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

X-Organization-Id
string

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.

Query Parameters

environment
enum<string>
default:live

Which environment to act in. A view parameter, valid only on the staff surface — a machine credential never chooses its environment, it is resolved from the key.

Available options:
live,
test

Body

application/json

Creating or editing a document. On PATCH, an omitted field keeps its value.

slug
string

Lowercase letters, digits, hyphens and underscores. Refused rather than normalised — it is typed twice, here and in your own markup.

title
string

At most 160 characters.

enforcement
enum<string>

Defaults to required on creation.

Available options:
required,
optional
archived
boolean

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.

segment_id
string<uuid> | null

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, with no version yet.

document
object

One of your terms: a name, an address, and a rule about whether agreeing is required. The words are versions of it.