Webhook RelayQuickstart

Event filters

Subscriptions don't receive every event by default — they receive events whose type matches their event_filter. The filter language is small on purpose.

Three forms

FilterMatches
*every event in the workspace
order.createdexact match only
order.*prefix glob — order.created, order.shipped, order.deep.nested.type

Naming events

Event types use a dot-separated, lower-case grammar: noun.verb or noun.verb.detail. Examples from existing patterns: order.created, payment.succeeded, user.signed_up, invoice.payment_failed. The validation regex is ^[a-z0-9._-]{1,128}$.

Two failure modes

The wildcard isn't a substring

order.* matches order.created but not order. The glob always extends past at least one dot.

Filter changes don't affect past events

Editing a subscription's filter changes which future events match. It does not retroactively dispatch deliveries for events that were ingested before the change. To replay against a new filter, use the dead-letter / retry endpoints.

Coming later: JSONPath body filters

A second filter (e.g. $.amount > 100) is in the plan but not shipped yet. Today, filtering happens at the type level only.

curl
# Subscribe to every order event:
curl -X POST https://api.webhook-relay.dcsuniverse.com/v1/subscriptions \
  -H "Authorization: Bearer whk_live_..." \
  -d '{"url":"https://my-app/hooks","event_filter":"order.*"}'