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 a 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 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)
What's next?
- Events - Understanding event structure
- Labels - Filtering events with labels
- Request Attempts - Track delivery status and retries
- Application Secrets - Understanding webhook signatures
- Secure Webhook Endpoints - Complete security guide