Skip to main content
PUT
Register a contract version

Authorizations

Authorization
string
header
required

JWT issued by the identity provider. A producer calls with a service credential issued for the tenant it sends facts for; a reader calls with a user token or a service credential. The tenant is always taken from the token, never from the request path, query or body.

Path Parameters

producer
string
required

Producer service that owns the fact type.

Example:

"checkout-api"

namespace
string
required

Namespace of the fact type.

Example:

"acme.checkout"

type
string
required

Fact type name.

Example:

"checkout.order_placed"

schemaVersion
string
required

Semantic version of the contract (major.minor.patch).

Example:

"1.0.0"

Body

application/json
hash
string
required

Content hash computed by the producer (the prefix sha256: plus 64 lowercase hex characters), verified by the server against the content sent.

Example:

"sha256:0000000000000000000000000000000000000000000000000000000000000000"

references
object[] | null
required

References facts of this type carry; scope and sensitivity come from each reference type and cannot be declared here.

schema
any
required

Self-contained JSON Schema 2020-12 document that every fact payload of this type must satisfy.

team
string
required

Owning team or squad, audited, never an identity: 1 to 128 UTF-8 bytes (accented letters take two or more), no surrounding whitespace or control characters.

Example:

"checkout-squad"

compatibilityPolicy
string

How a new version is checked against the earlier versions of its major; optional, defaults to TRANSITIVE. Allowed values: TRANSITIVE.

Response

Identical content is already registered under this identity: a replay that changes nothing. The body is the stored contract version.

createdAt
string<date-time>
required

When this version was registered. RFC 3339, UTC.

hash
string
required

Content hash verified at registration (the prefix sha256: plus 64 hex characters); the authoritative integrity value of this version.

namespace
string
required

Namespace of the fact type, bound to the producer that registered in it first.

Example:

"acme.checkout"

producer
string
required

Producer service that owns the fact type.

Example:

"checkout-api"

references
object[] | null
required

References facts of this type carry, each with the scope and sensitivity its reference type had at registration.

schema
any
required

Payload schema as stored: member order, whitespace and number spelling may differ from what was sent, so check integrity with hash, never by rehashing this.

schemaVersion
string
required

Semantic version of this contract (major.minor.patch).

Example:

"1.0.0"

status
enum<string>
required

Lifecycle status: a DEPRECATED version refuses new facts and never returns to ACTIVE. Allowed values: ACTIVE, DEPRECATED.

Available options:
ACTIVE,
DEPRECATED
team
string
required

Owning team or squad, as registered; informational and audited, never an identity.

Example:

"checkout-squad"

type
string
required

Fact type name, chosen by the producer.

Example:

"checkout.order_placed"

compatibilityPolicy
enum<string>

How a new version is checked against the earlier versions of its major. Allowed values: TRANSITIVE.

Available options:
TRANSITIVE