Supported events
| Event | Trigger |
|---|---|
alert.created | A new alert is raised (e.g. critical policy failure). |
Creating a subscription
secret field that is shown only once. Store it securely for signature verification.
Payload format
When an event fires, MeshQu sends aPOST request to your URL:
Request headers
Every webhook request includes these headers:| Header | Description |
|---|---|
X-MeshQu-Event | Event type (e.g. alert.created). |
X-MeshQu-Delivery-Id | Unique delivery UUID. |
X-MeshQu-Tenant-Id | Tenant UUID. |
X-MeshQu-Timestamp | Unix timestamp in milliseconds. |
X-MeshQu-Attempt | Delivery attempt number (starts at 1). |
X-MeshQu-Signature | HMAC signature for verification. |
Content-Type | application/json |
Verifying signatures
Each delivery is signed with HMAC-SHA256. The signature header has the format:- Concatenate the timestamp and payload:
{timestamp}.{json_body} - Compute HMAC-SHA256 using your webhook secret.
- Compare with the signature in the header.
- Reject requests where the timestamp is more than 5 minutes old (replay protection).
Retry behaviour
If your endpoint returns a non-2xx status or times out, MeshQu retries with exponential backoff:| Attempt | Delay |
|---|---|
| 1 | Immediate |
| 2 | ~1 second |
| 3 | ~2 seconds |
| 4 | ~4 seconds |
| 5 | ~8 seconds |
| 6 | ~16 seconds |
Timeout
Your endpoint must respond within 10 seconds. Longer processing should be handled asynchronously (accept the webhook, enqueue, process later).Managing subscriptions
Best practices
- Return 200 quickly. Acknowledge receipt and process asynchronously.
- Verify signatures. Always validate
X-MeshQu-Signaturebefore trusting the payload. - Handle duplicates. Use
X-MeshQu-Delivery-Idto deduplicate if your handler is not idempotent. - Monitor delivery stats. Check the
/deliveries/statsendpoint periodically to catch failures early.