Skip to main content

Subscriptions

A subscription tells Hook0 where to deliver events and which events to deliver. It pairs a webhook endpoint URL with filtering criteria so only relevant events get sent.

Key points​

  • Subscriptions belong to an Application
  • Each subscription specifies a target URL and filtering criteria
  • Filtering uses Event Types and Labels
  • Subscriptions can be enabled or disabled without deletion
  • Each subscription has its own secret for signature verification

How subscriptions work​

Filtering​

Subscriptions filter events in two ways:

Event type filtering​

Subscribe to specific event types (e.g., order.created, user.updated). Only events with matching types trigger deliveries.

Label filtering​

Narrow down further using labels. A subscription with label tenant_id: "acme" only receives events that have that exact label.

Both filters must match for an event to be delivered.

Target types​

Subscriptions support HTTP targets where webhooks are delivered via POST (or other methods) to your endpoint. The target configuration includes:

  • URL where the webhook is sent
  • HTTP method (typically POST)
  • Custom headers

Subscription secrets​

Each subscription has its own secret, used to sign the payloads Hook0 delivers to it. It is a different value from the application secret, which is an API token and never signs anything. Recipients use the subscription secret to verify:

  • The webhook came from Hook0
  • The payload wasn't modified in transit
  • The webhook is fresh (timestamp validation)

What's next?​