POST request with a JSON body to your HTTPS URL.
Payload
Both conditions use the type
alert.threshold_reached. Read data[].condition to tell them apart.
The condition, threshold and filters in a delivery are the ones the window fired under. If someone edits the alert after that, a retry of the same delivery still sends the old values.
A test send has "type": "alert.test", a new id, data[0].test = true, and the alert’s current condition, threshold and trigger_filters. It has no count or window.
Headers
Verify the signature
The signing secret (whsec_...) is shown once, when you create the alert or when you change the alert to a new webhook URL. A new URL always gets a new secret. To verify a request:
- Read the raw request body. Do not parse and re-serialize it first.
- Refuse a timestamp more than five minutes from your clock.
- Compute the HMAC-SHA256 of
{timestamp}.{raw body}with the secret. - Compare it with
X-Webhook-Signaturein constant time.
Node.js
Delivery rules
- Respond with a
2xxstatus. Any other result, including a3xxredirect, is a failed delivery. - A request times out after 5 seconds. The response body is ignored.
- Failed deliveries retry with backoff, up to five attempts. Delivery is at least once.