Documentation menu
Respond

Webhooks

Send incident and deployment events to your own systems.

Incidion sends an HTTPS POST to your endpoint when something happens in your organization: an incident opens, is acknowledged or resolved, a monitor changes state, a deployment finishes, a member joins or leaves, or an alert rule fires.

Webhooks are available on the Pro plan and higher (on Free, creating one answers 403 PlanLimitExceeded). Admins and owners manage them in the app (Settings > Webhooks), the web dashboard (Configure > Webhooks) or through the API:

curl -X POST https://api.incidion.dev/api/v1/organizations/$ORG_ID/webhooks/ \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Incident bridge",
    "url": "https://hooks.example.com/incidion",
    "events": ["incident.created", "incident.resolved"],
    "custom_headers": {"Authorization": "Bearer my-receiver-token"}
  }'

The answer (201) contains the signing secret once. An endpoint can be limited to one project.

Events

Event When
incident.created An incident opens (monitor, alert or manual)
incident.acknowledged Someone acknowledged the incident
incident.resolved The incident was resolved (by a person or automatically)
incident.updated Any other status change, or an update was posted
monitor.down, monitor.up, monitor.degraded A monitor changed state
deployment.started, deployment.succeeded, deployment.failed Deployment lifecycle
member.joined, member.removed Organization membership changed
alert.triggered An alert rule with a webhook channel fired
alert.test “Test” on an alert rule ("test": true in the body)
webhook.test “Test” on the webhook endpoint

GET /api/v1/organizations/{org_id}/webhooks/events/ lists the event types you can subscribe to.

Request

POST /your/endpoint HTTP/1.1
Content-Type: application/json
User-Agent: Incidion-Webhooks/1.0
X-Incidion-Event: incident.resolved
X-Incidion-Delivery: 5b0c3f5e-...        (unique per delivery; stays the same on retries)
X-Incidion-Attempt: 1                    (1 for the first try, 2 for the first retry, ...)
X-Incidion-Signature: t=1767225600,v1=9f2c...

{"event":"incident.resolved","timestamp":"2026-01-01T00:00:00+00:00","data":{...}}

Your custom headers (for example an Authorization token for your receiver) are added as well. They cannot override any X-Incidion-*, X-Webhook-*, Content-Type, Content-Length, Host, User-Agent, Connection or Transfer-Encoding header; the API rejects such names.

For receivers built against the first version, these headers are still sent: X-Webhook-Id, X-Webhook-Event, X-Webhook-Timestamp and X-Webhook-Signature-256: sha256=<hex> (HMAC-SHA256 of the body only). The legacy signature does not cover the timestamp, so it cannot stop replays. Use X-Incidion-Signature for new receivers.

Verifying the signature

Every endpoint has a signing secret (whsec_...). It is returned once, in the response to creating the endpoint, and again when you rotate it with POST /api/v1/organizations/{org_id}/webhooks/{id}/regenerate-secret/.

X-Incidion-Signature has the form t=<unix seconds>,v1=<hex>, where <hex> is the HMAC-SHA256, keyed with the secret, of the string "<t>.<raw request body>".

To verify a request:

  1. Split the header on , and each part on the first =; read t and v1.
  2. Reject the request if t is more than 5 minutes away from your clock. This stops an attacker who captured a request from replaying it later.
  3. Compute HMAC-SHA256(secret, t + "." + raw_body) as lowercase hex, using the raw body bytes exactly as received (before any JSON parsing).
  4. Compare it with v1 using a constant-time comparison.
  5. Optionally remember X-Incidion-Delivery and ignore repeats (retries reuse the delivery id, and so does a manual retry).

Python:

import hashlib
import hmac
import time


def verify(secret: str, header: str, body: bytes, tolerance: int = 300) -> bool:
    try:
        parts = dict(item.split("=", 1) for item in header.split(","))
        timestamp, received = parts["t"], parts["v1"]
        if abs(time.time() - int(timestamp)) > tolerance:
            return False
    except (KeyError, ValueError):
        return False
    expected = hmac.new(
        secret.encode(), f"{timestamp}.".encode() + body, hashlib.sha256
    ).hexdigest()
    return hmac.compare_digest(expected, received)

Node.js:

const crypto = require('crypto');

function verify(secret, header, rawBody, toleranceSeconds = 300) {
  const parts = Object.fromEntries(header.split(',').map((p) => p.split(/=(.*)/s).slice(0, 2)));
  const t = Number(parts.t);
  if (!parts.v1 || !Number.isFinite(t) || Math.abs(Date.now() / 1000 - t) > toleranceSeconds) return false;
  const expected = crypto.createHmac('sha256', secret).update(`${parts.t}.`).update(rawBody).digest('hex');
  return expected.length === parts.v1.length && crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1));
}

Responses, retries and auto-disable

  • Answer with any 2xx status within 15 seconds (5 seconds to connect). The body of your answer is stored (first 1000 characters) for the delivery log.
  • Redirects are not followed; a 3xx answer counts as a failure and is not retried. Fix the URL instead.
  • Any other failure (timeout, connection error, 4xx, 5xx) is retried with exponential backoff. With the default settings (5 attempts, 30 second base) the retries wait 30 s, 2.5 min, 12.5 min and 1 h, so the last attempt happens about 75 minutes after the first. Each wait is base * 5^(n-1) seconds, capped at one hour. max_retries (1-10 attempts in total) and retry_backoff_base (5-600 seconds) can be changed per endpoint.
  • 410 Gone and 413 Payload Too Large are not retried.
  • After auto_disable_threshold deliveries in a row (default 50) used up all their attempts, the endpoint is disabled and disabled_reason says why. Enable it again with PATCH {"is_active": true}.

Delivery log, retry and redelivery

  • GET /api/v1/organizations/{org_id}/webhooks/{id}/deliveries/ lists the deliveries of an endpoint (filter with ?status= and ?event_type=).
  • GET /api/v1/organizations/{org_id}/webhooks/{id}/deliveries/{delivery_id}/ shows one delivery with payload, response status, headers and body.
  • POST /api/v1/organizations/{org_id}/webhooks/{id}/deliveries/{delivery_id}/redeliver/ sends the same event and payload again as a new delivery (new id, fresh timestamp and signature). redelivered_from points to the original.
  • POST /api/v1/organizations/{org_id}/webhook-deliveries/{delivery_id}/retry/ retries a failed delivery immediately under its existing id.

Destinations

Webhook URLs must use https:// and resolve to public internet addresses. Private, loopback, link-local (including cloud metadata), carrier-grade NAT and other reserved ranges are rejected when you save the URL and again when each request connects, so a DNS change cannot redirect deliveries into a private network.