Skip to main content

Subscriptions

A subscription is a configuration that tells Hook0 where to deliver events and which events to deliver. Subscriptions connect your webhook endpoints to the events they care about.

Key Points

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

How Subscriptions Work

Event arrives at Hook0
|
v
+-------------------+
| Match Event Type |
+-------------------+
|
v
+-------------------+
| Match Labels |
+-------------------+
|
v
+-------------------+
| Create Request |
| Attempt |
+-------------------+
|
v
Deliver to
Subscription
Target

Filtering Criteria

Subscriptions filter incoming events using two mechanisms:

Event Type Filtering

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

Label Filtering

Further refine which events to receive using labels. For example, 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 to send the webhook
  • HTTP Method - Typically POST
  • Headers - Custom headers to include

Subscription Secrets

Each subscription has an associated secret used to sign webhook payloads. Recipients use this secret to verify:

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

Benefits

  • Real-Time Notifications - Immediate updates when events occur
  • Decoupled Architecture - Separate concerns between event producers and consumers
  • Selective Delivery - Only receive events you care about
  • Automated Actions - Trigger workflows, emails, or database updates

Use Cases

Webhook subscriptions enable automation across many domains:

  • E-commerce - Order notifications, inventory updates, shipping alerts
  • Payments - Transaction confirmations, refund notifications
  • CRM - New customer alerts, profile updates
  • DevOps - Deployment notifications, monitoring alerts
  • Healthcare - Appointment reminders, record updates

What's Next?