Custom Webhooks
Receive webhooks from any HTTP source that is not Stripe or GitHub.
Overview
Zen Mesh can ingest webhooks from any HTTP client. A generic HTTP source accepts POST requests and applies configurable verification, filtering, and routing before delivery. This is suitable for custom applications, internal systems, or any webhook provider not covered by the built-in integrations.
Creating a Generic Source
- In the Zen Mesh dashboard, navigate to Sources → Add Source
- Select Generic HTTP as the provider type
- Configure:
- Name: A descriptive identifier (e.g.,
custom-analytics-events) - Ingestion URL: The Zen Mesh URL where your source sends events
- Verification: Choose your verification method
- Name: A descriptive identifier (e.g.,
- Save the source
Verification Options
| Method | Description | Configured Via |
|---|---|---|
| HMAC-SHA256 | Verify request signature against a shared secret | Source settings |
| Header Validation | Check for required header values | Source settings |
| IP Allowlisting | Restrict accepted source IPs | Source settings |
| None | Accept all requests (not recommended for production) | Source settings |
HMAC Verification
If your custom source supports signing requests:
- Generate a shared secret
- Configure it in both your source and Zen Mesh
- Your source sends an
X-Signature-256header with the HMAC-SHA256 digest of the request body - Zen Mesh computes the expected signature and rejects mismatches
Header Validation
Require specific headers to be present on incoming requests:
Required Headers:
X-Source-Token: <expected-value>
X-Source-Version: ^2024\..*
Requests missing required headers or with non-matching values are rejected before delivery.
Ingestion URLs
Each source receives a unique ingestion URL:
https://ingest.zen-mesh.io/hooks/<hook-id>
Your custom application sends POST requests to this URL. The request body must be valid JSON.
Example: Custom Application Webhook
curl -X POST https://ingest.zen-mesh.io/hooks/hook_abc123 \
-H "Content-Type: application/json" \
-H "X-Source-Token: s3cr3t-t0k3n" \
-d '{
"event": "order.created",
"data": {
"order_id": "ORD-12345",
"amount": 2999,
"currency": "USD"
}
}'
Filtering and Routing
Apply JSONPath Routing to filter events by content:
{
"match": {
"jsonpath": "$.event",
"exact": "order.created"
}
}
Use JSONPath Transforms to normalize payloads:
[
{ "target": "event_id", "source": "jsonpath", "expression": "$.data.order_id" },
{ "target": "amount", "source": "jsonpath", "expression": "$.data.amount" },
{ "target": "source", "source": "static", "value": "custom-app" }
]
Content Type
Zen Mesh accepts application/json payloads. The request body is parsed as JSON for filtering and transform operations. Other content types are delivered as-is but cannot be processed by JSONPath rules.
Related
- Sources Overview — all supported source types
- JSONPath Routing — event filtering by content
- JSONPath Transforms — payload normalization
- IP Allowlisting — restrict source networks
- Header Validation — validate incoming headers