Hanzo
OpenapiRisk

Publish your organisation's model as a named, immutable value

Publishes your organisation's model as a NAMED VALUE, so a decision taken today can be reconstructed tomorrow and a change made today can be undone.

POST /v1/risk/state/model

Addresshttps://api.hanzo.ai/v1/risk/state/model
MethodPOST
OperationriskPublishModel
AuthAuthorization: Bearer $HANZO_API_KEY

Publishes your organisation's model as a NAMED VALUE, so a decision taken today can be reconstructed tomorrow and a change made today can be undone.

It answers with a NAME and not with the state. The masses stay on your organisation's own encrypted store and are referred to by an address computed from their own content: the shape, the geometry seed, the position in the window, the threshold, the masses themselves as IEEE-754 bits, and the fold watermark behind them. That is what makes the value nameable without making the caller its custodian.

IT IS IDEMPOTENT ON THE VALUE. A model that has not changed publishes to the name it already has and mints nothing, reporting minted=false — so publishing at every boundary that matters is free. Ten values are retained per organisation, bounded in BYTES rather than in rows, and the oldest is disposed of past that.

A model that has learned nothing is refused: planted is not learned, and a value that reproduces nothing is not a value.

It is POST and PUT on one address because they are one plane's two verbs over one kind of thing: POST mints a value from the model in force, PUT puts a value in force. They were /v1/risk/state/snapshot and /v1/risk/state/restore — two addresses named after the operation rather than after the thing, which is how a reader ends up asking what the difference between a snapshot and a value is.

Request

The document declares no body for POST /v1/risk/state/model. The handler is typed in cloud but its shape is not yet emitted, so the fields are not listed here — ask the MCP door's describe for riskPublishModel, which answers from the running route.

Response

StatusBodyMeaning
201riskPublishOutcreated

201 body — 9 fields.

FieldInTypeAlwaysDescription
mintedbodybooleanMinted is false when your model was ALREADY published under this name and nothing was written.
tenantbodystringTenant is whose history it entered.
valuebodyriskModelValue
value.addressbodystringAddress names this value by its own content: the model's shape, the geometry seed, its position in the window, its threshold, its masses as IEEE-754 bits and…
value.atbodystringAt is when it was published, RFC 3339, on the server clock.
value.learnedbodyintegerLearned is how many events are behind the masses.
value.sequencebodyintegerSequence is this value's place in YOUR organisation's own history, from 1 and contiguous until retention disposes of the oldest.
value.shapebodystringShape NAMES the model space the masses are only meaningful against, as <family>:<digest> — the KIND of model, and that family's own digest over the feature…
value.warmedbodystringWarmed is how far your own event surface had been folded in when this value was published, RFC 3339.

Failure carries the platform error shape — see Errors.

Examples

hanzo risk state model create

Risk API · All Hanzo APIs · Interactive reference

How is this guide?

On this page