Skip to content

Payload schemas

A service can publish versioned JSON schemas for its payload. Subscribers see exactly what they’ll receive and are told when it changes, and you can enforce the schema so payloads that don’t match are never delivered. Public schemas also appear in the Zekt Registry.

  • Provider → Schema Handling lists all your provider and consumer services, with their event type, schema and enforcement status. Filter by type, schema or enforcement. Click a service name to open its editor. Open Zekt Registry opens the public Registry.
  • Each service’s editor (Provider → Service Descriptions) has a Schema Registry card.
  1. Open the service in its editor and turn on Enable Schema Registry. Save the service first if it’s new (Please save the service first before defining a schema).
  2. Choose Define Schema, or Edit Schema once a version exists. The editor’s title says which schema you’re editing: Broadcast Schema for a provider service, Input Schema or Output Schema for a consumer service.
  3. In the left panel, check the Version (semver) (pre-filled as the next minor version), add a Changelog, and tick Breaking Change if you know the change breaks subscribers. Infer from Sample builds fields from an example payload, and Clear All Fields starts over.
  4. Define the schema in one of the tabs:
    • Fields: use Add Field. Each field has a name, a type (String, Integer, Number, Boolean, Array or Object), Required and a description. Strings can also have a Format (Date/Time, Date, Time, Email, URI, UUID) and a Pattern; strings and numbers can have Enum values.
    • JSON Schema: edit the JSON Schema (Draft 2020-12) directly. Once you edit the JSON, the field builder is read-only for that edit.
    • Workflow Snippet: an example for your workflow.
  5. Choose Publish Schema.
  • Versions are semantic versions: major.minor.patch. Prerelease versions such as 1.2.0-beta.1 are allowed, but never become the current version.
  • A new version must be greater than every existing one.
  • Up to 20 versions per schema. The card shows how many you’ve used.
  • Size and content limits are on the Limits page.

Zekt decides whether a version is breaking. Your Breaking Change tick can mark a version breaking, but can’t overrule Zekt’s verdict.

  • A breaking change within the same line (same major version; same minor for 0.x) is refused, and the message tells you which version to publish it as instead, a new major.
  • For a provider service’s schema, a change that accepts more payloads is breaking, for example dropping a required field or widening a type. Narrowing is safe.
  • For a consumer service’s input schema, narrowing is breaking.
  • Anything Zekt can’t prove safe, such as oneOf/allOf or a changed $ref or pattern, counts as breaking.

Publishing screens the schema and the changelog for secrets. Tokens, keys, connection strings, URLs with credentials and card numbers block the publish (Cannot Publish — Potential Secrets Detected). If screening flags example values such as GUIDs, email addresses or IP addresses, replace them with neutral placeholders and publish again.

Turn on the toggle in the Enforcement column of Provider → Schema Handling. It’s available once a version is published (Publish a schema first to enable enforcement.).

  • Provider service: the payload your workflow sends is checked against the current version (the highest stable one). If it doesn’t match, nothing is delivered to any subscriber.
  • Consumer service: each subscriber’s payload is checked against the version its own version policy resolves to, and only that subscriber’s send is blocked.

Events go through without a check when enforcement is off, no schema is published, the event has no custom payload, or the payload is Shield-encrypted.

Blocked payloads appear in Provider → Delivery Status under the Schema Violations filter. The detail shows Schema Enforcement Blocked This Payload with up to 10 errors. Deliveries also show a Schema: line, for example Matched schema v1.2.0.

With enforcement on, delivered events carry zekt.schemaVersion and zekt.schemaValid (see the event payload reference).

Turn on Show schema before access in the Schema Registry card, then save the service. It needs Enable Schema Registry on.

Service visibilityWho sees the schema before access
PublicEveryone in the Directory, and on the public Registry.
OrganizationThe service’s audience in the Directory. Never on the Registry.
UnlistedNot available: the toggle is disabled.

You and your approved subscribers always see the schema.

Open View Versions and choose Delete v… (active versions only). Deletion is refused when a subscriber pinned that version, a subscriber’s policy resolves to it, or it’s the latest version and there are active subscriptions. The refusal (… is in use, Not deleted.) offers Force delete after you type the version number.

After a force delete, subscribers keep receiving events, checks move to the next most recent version, and affected subscribers get a notice.

Deprecating a version (with a successor and a sunset date at least 30 days ahead) is handled by the platform. There’s no console control for it yet.

Choose which version you follow in Consumer → Subscriptions: use the Schema button on the subscription, then Version policy.

PolicyFollows
LatestThe current version.
MajorThe newest stable version in the major version you acknowledged (or of the current version, if you haven’t acknowledged one).
MinorThe same, within the major.minor version.
ExactThe version you pin with Pin v…. If it’s retired, its successor; otherwise the current version.

Choose Save policy to keep it. Acknowledge v… records the version you’ve reviewed.

  • When the version you follow changes, you see a banner in that view, and a notice under Profile → Messages.
  • Your policy never holds back delivery. Events keep arriving whatever version you follow.

A consumer service can also publish an output schema, describing the values it returns when it runs as an orchestration step. Find it under Service Descriptions → Consumer Services → edit → Schema Registry → Output Schema. The tab appears only when Supports Orchestration is on.

  • Outputs are checked after each step, but a mismatch only warns. It never fails the step.
  • Subscribers get no notices about output schema changes.
  • Provider services have no output schema in the console.