Core Concepts: Understanding Destinations
A Destination is a single endpoint URL where HookMux forwards a webhook payload. This is typically your own API, a Slack webhook URL, a CRM, or any other service that can accept an HTTP request.
The Fan-Out Model
The primary power of HookMux is its "fan-out" model. A single Source can have many Destinations.
When an event arrives at your Source, HookMux delivers it in parallel to all of its attached, active Destinations.
This simple model unlocks powerful workflows without any code:
┌──> Destination 1 (e.g., Your Production API)
│
Stripe Event ──> HookMux Source ──> Destination 2 (e.g., Your Slack Channel)
│
└──> Destination 3 (e.g., Your Analytics Service)
Destination Settings (In-Depth)
You can configure two powerful features on every Destination:
1. Custom Headers (Outbound Authentication)
This is the most critical feature for using HookMux with private services.
The "Two-Hop" Problem:
- Hop 1 (Sender → HookMux): A sender like Stripe authenticates itself to HookMux (using a Stripe-Signature).
- Hop 2 (HookMux → Your API): Your private API needs to authenticate HookMux. It doesn't know (or care about) Stripe's signature. It needs its own API key.
The Solution:
The Custom Headers feature lets you add authentication headers for Hop 2. When creating a Destination, you can add key-value pairs that HookMux will securely attach to every request it sends to that endpoint.
Example:
- Header Name:
Authorization - Header Value:
Bearer sk_live_mysecrettoken12345
Security: All header values you provide are end-to-end encrypted at rest in our database. They are write-only and cannot be viewed by anyone (including our team) after you save them.
2. Rate Limiting (RPS)
This feature protects your server from being overloaded.
Many third-party services (and your own APIs) have rate limits (e.g., "10 requests per second"). If a sender (like GitHub) sends 100 events at once, HookMux could flood your server, causing it to return 429 Too Many Requests errors.
The Solution:
You can set a Max Requests Per Second (RPS) limit on any Destination.
- Example: If you set the limit to 10, HookMux will only send 10 events per second to that endpoint.
- For now, the remaining 90 events are dropped, and a
429error will be returned. - In our next future release, the remaining 90 events are automatically held in a high-performance queue and delivered as your rate limit window opens up, complete with automatic retries. This smooths out spikes and ensures every event is delivered reliably without overwhelming your server.