Skip to main content

Explore webhook event schemas from the catalog

What the catalog answers

Every webhook endpoint you register subscribes to named event types — message.delivered, message.failed, call.completed, and the rest of the catalog. The question you need answered before any receiver code runs is two-fold: which events exist, and what shape is each payload. Until now answering it meant waiting for the first delivery to land, or hand-mining the reference pages. The event schema catalog closes that gap. Orbit publishes one machine-readable entry per event type, each carrying:
  • event_type — the literal you subscribe to (e.g. message.delivered).
  • json_schema — a JSON Schema Draft-07 envelope schema with required: ["id", "type", "created_at", "data"] and the type literal pinned via const, so a validator rejects a mismatched envelope.
  • example_payload — a realistic example of the full envelope, so you can see exactly what your endpoint receives.
  • fingerprint — a deterministic sha256:<16 hex> content hash of the schema. Pin it in CI and any schema change — a new required field, a tightened enum — breaks the build loudly instead of your receiver parsing nulls at runtime.
Wiring a receiver without the catalog means one of two failure modes: your code guesses the field set (wrong), or it treats data as an opaque bag (unvalidated). Either way the defect ships silently. Read the schema first.
The catalog is static platform metadata — the same for every tenant — and lives behind the same webhooks:read scope as the rest of the webhooks API.

Browse in the dashboard

Open Developer → Webhooks → Event catalog in the dashboard. The page lists every event type Orbit can dispatch with a search box that matches on the event-type string and the example payload; pick an event and the detail pane shows its copyable fingerprint chip and the pretty-printed example payload. This is the same catalog the API endpoint serves, rendered for browsing. Use the dashboard when you are picking which events to subscribe to. Use the API (next section) when you are generating types or wiring CI.

Fetch over the API

GET /api/v1/webhooks/event-schemas returns the full catalog. Every entry sits in the standard { data, meta } envelope, so the array of schema entries lives at data in the response.
Narrow it down to one surface with jq — here everything in the message family:
Pick your event_type out of that list and pull the whole entry, including the realistic example:
The example is the payload shape as it actually arrives — maskable phone numbers are prefix-masked (+1415555****), the envelope is flat { id, type, created_at, data }, and there is no wrapper you need to unwrap. Copy the example_payload into a fixture and you have a test body that round-trips the schema.

Validate your receiver against the schema

Each entry’s json_schema is a complete Draft-07 document. Feed it to any Draft-07-capable validator and your receiver stops trusting wire bytes blind.

Node.js with ajv

Validation runs after signature verification — a payload you have not authenticated is wire noise, and validating it burns cycles on attacker bytes. Do it in the queue worker, past signature + dedupe checks.

Generate a TypeScript model instead of runtime-checking

If you prefer compile-time types, hand the schema to a codegen tool (json-schema-to-typescript, quicktype) and emit a model:
Regenerate in CI on a schedule and let the diff review catch schema moves. Pair that with the fingerprint pin below so the schema move also fails the build instead of sneaking through.

Pin the fingerprint in CI

Every entry carries fingerprintsha256:<16 hex> over the canonical schema content. Because it depends on schema content only (never key ordering), a subscriber can pin it, and any change to the schema breaks the build at the pin instead of corrupting a live receiver. Save this as scripts/check-webhook-schema-fingerprint.mjs and run it in CI:
A drift failure is the point — it forces a human to review the schema diff and re-pin intentionally. Update the pinned value after the review, never by reflex. In your consumer, treat the fingerprint as a schema-version handle too. When a payload validates against a schema whose fingerprint is in PINS, you are on a known contract; log the fingerprint alongside the event id to build an audit trail of which schema version processed which events.

Next steps