Skip to main content
MeshQu can send real-time HTTP notifications when alerts are created. You subscribe to events by registering a webhook URL.

Supported events

Creating a subscription

The create response includes a secret that is shown only once:
The secret is returned exactly once. Save it to your secrets manager immediately — it is encrypted at rest on our side (AES-256-GCM) and cannot be retrieved again. If you lose it, delete the subscription and create a new one to obtain a fresh secret.

Filtering: which alerts you receive

A subscription delivers an alert only if it matches both filters. severity_min sets the minimum severity (inclusive): decision_types restricts delivery to alerts arising from specific decision types. Omit it (or pass an empty array) to receive alerts from every decision type. A critical-only, type-scoped subscription is the typical shape for paging on-call:
SSRF protection. The webhook URL must be HTTPS in production and its host must resolve to a publicly-routable address. URLs that resolve to private, loopback, link-local, cloud-metadata, or otherwise reserved ranges are rejected — both when you create the subscription and again at delivery time. If a legitimate endpoint is being rejected, this is operator-only allowlist configuration, never self-service — contact us.

Payload format

When an event fires, MeshQu sends a POST request to your URL:

Request headers

Every webhook request includes these headers:

Verifying signatures

Each delivery is signed with HMAC-SHA256. The signature header has the format:
To verify:
  1. Concatenate the timestamp and payload: {timestamp}.{json_body}
  2. Compute HMAC-SHA256 using your webhook secret.
  3. Compare with the signature in the header.
  4. Reject requests where the timestamp is more than 5 minutes old (replay protection).
The same verification in Python:
Verify against the raw request body, byte for byte — not a re-serialized parse of it. Re-encoding JSON can reorder keys or change whitespace and will break the signature. Read and verify the raw body first, then parse it.

Retry behaviour

If your endpoint returns a non-2xx status or times out, MeshQu retries with exponential backoff: After the maximum attempts are exhausted, the delivery moves to a dead-letter queue and the failure reason is recorded on the delivery record.

Inspecting and replaying deliveries

Every delivery attempt is persisted, so you can monitor and debug without trawling logs. Each delivery has one of these statuses:
If a delivery is failed or dead — for example after you fixed an outage on your side — you can force an immediate retry. This resets the attempt count and schedules delivery right away:
Retrying a delivery that is already delivered returns 400 ALREADY_DELIVERED; retrying one still pending returns 400 STILL_PENDING.

Timeout

Your endpoint must respond within 10 seconds. Longer processing should be handled asynchronously (accept the webhook, enqueue, process later).

Handling a webhook end to end

A robust handler verifies the signature against the raw body, responds fast, and processes out of band:

Managing subscriptions

To change a subscription’s filters, delete it and create a new one. Deleting a subscription stops further deliveries to that endpoint.

Best practices

  • Return 200 quickly. Acknowledge receipt and process asynchronously.
  • Verify signatures. Always validate X-MeshQu-Signature before trusting the payload.
  • Handle duplicates. Use X-MeshQu-Delivery-Id to deduplicate if your handler is not idempotent.
  • Monitor delivery stats. Check the /deliveries/stats endpoint periodically to catch failures early.