Skip to main content
PUT
Create or re-declare a state

Authorizations

x-api-key
string
header
required

Path Parameters

name
string
required

Response

Success.

data
StateDeclaration · object
required

A declared state: its name, human description, base JSON schema (wire key schema, attribute schema_), the subject_kinds it serves (≥1, unique, each matching :data:SUBJECT_KIND_RE), the default_subject_kind a door's ambient subject resolves to (one of subject_kinds), and an optional retention_days (a positive INT4, or unset to keep records forever).

effective_schema is the base schema composed with every attached template's fragment, and regimes are the absolute write-regime rules composed over the attachments (each {path, regime}, the attachment path prefixed onto the template's regime paths). updated_at is the row's last-write timestamp. The platform computes all three and serves them on every read; a client that supplies a non-None value for any of them on a write is refused (… is set/computed by the platform), so none can be forged across the wire.