Skip to main content
One signed POST per alert to each endpoint subscribed to its kind. Manage endpoints on the Webhooks screen of the app or with these routes. Every webhook route needs a key with the approve scope (only an organization admin can put it on a key) whose creator is still an organization admin, because a webhook sends the organization’s alerts to a URL on the internet. URLs must be public https with no credentials in them; at most 10 endpoints per organization.

Routes

Register an endpoint

Events

events lists the alert kinds an endpoint subscribes to. Omit events to subscribe to every kind. A delivery’s type is insightchain.<kind>.

The request

One POST per alert and endpoint, with Content-Type: application/json. created_at is when the alert was raised, and the body is the same on every retry.

Verify the signature

Do this before trusting the body.
  1. Read the raw request body; do not re-serialise parsed JSON.
  2. Split X-InsightChain-Signature-V2 on , into t and one or two v1 values.
  3. Compute HMAC-SHA256 of t + "." + rawBody with the secret you hold, as lowercase hex, and compare it with each v1 in constant time. Accept the delivery when any matches.
  4. Refuse the request when t is more than 300 seconds from your clock (replay protection).
  5. Dedupe on alert_id or X-InsightChain-Delivery: delivery is at least once.
The recipes show the same check with lines that try it out.

Answering and retries

Any 2xx within 5 seconds counts as delivered. Redirects are not followed: register the final URL. No answer, a connection error, 408, 429 and 5xx are retried: up to 8 attempts per alert and endpoint, waiting 1 min, 5 min, 30 min, 2 h, 6 h, 12 h, 24 h after each failure. Other 4xx are not retried. POST /v1/webhooks/:id/test sends one insightchain.test event now (10 per organization per hour) and reports the outcome. A test event is sent once and never retried.

Delivery log and redelivery

GET /v1/webhooks/:id/deliveries lists every attempt of the last 30 days, newest first: the event type, what started it (event, scheduled, redeliver or test), the outcome, what your endpoint answered and how long it took. POST /v1/webhooks/:id/deliveries/:delivery_id/redeliver sends a finished delivery once more, now; delivery_id is the X-InsightChain-Delivery header your endpoint received. A delivery that is still being retried answers 409 delivery_pending, and an endpoint that is switched off 409 endpoint_inactive.

Rotating the secret

POST /v1/webhooks/:id/rotate_secret returns a new secret, once. Sent without a body, the old secret stops signing at once. With overlap_seconds (up to 604,800, seven days) both secrets sign until the window ends: X-InsightChain-Signature-V2 carries two v1 values, the new secret’s first and the previous one’s second. A receiver that accepts any matching v1 can switch secrets at any point in the window without refusing a delivery.

The older signature header

X-InsightChain-Signature stops being sent on 2027-06-30 (00:00 UTC). Move your receiver to X-InsightChain-Signature-V2 before that day.
X-InsightChain-Signature (sha256=<hmac of the body>) has no timestamp, so it cannot stop a replayed request. Until that day both headers are sent, as today; from then on a delivery carries X-InsightChain-Signature-V2 only, and a receiver that only checks the older header will refuse every delivery.