Risk RegisterGuides

Webhooks

Outbound webhooks deliver event notifications from Risk Register to your endpoint, usually within a minute of the change. Every delivery is signed with HMAC-SHA256 in a Stripe-style format, retried on failure, and protected against replay.

Plan availability

Webhooks require the Business plan. Risk Register staff can turn webhooks on for a specific organisation without a plan upgrade.

What you wantWhere
Verify a webhook signature in your codeVerifying signatures
The list of event types and their payloadsEvent types
Configure an endpoint in the app/{orgSlug}/settings/webhooks (an admin, on the Business plan)
List or read endpoints via the REST APIGET /api/v1/webhook-endpoints and GET /api/v1/webhook-endpoints/{id} (admin tokens). Endpoints are created, changed and revoked in the app.
Inspect delivery historyGET /api/v1/webhook-endpoints/{id}/deliveries

Architecture at a glance

┌─────────────────┐    inside tx    ┌──────────────────────┐    cron (60s)    ┌──────────────────┐
│  Tenant request │ ─────────────> │ webhook_event_outbox │ ───────────────> │  Inngest worker  │
│  (state change) │  audit + event │  (durable row)       │  drains pending  │  (HMAC sign +    │
└─────────────────┘                └──────────────────────┘                  │   POST + retry)  │
                                                                            └────────┬─────────┘
                                                                                     │
                                                                                     ↓
                                                                          ┌──────────────────┐
                                                                          │ Your endpoint    │
                                                                          │ verifies + 2xx   │
                                                                          └──────────────────┘

Every state-mutating call that emits a webhook event writes a durable row to webhook_event_outbox inside the same database transaction as the audit row. If the transaction rolls back, no event fires. If it commits, the event is guaranteed to be in the outbox.

A separate Inngest cron sweeps the outbox once a minute and hands pending events to the delivery worker. Once the hand-off succeeds, the row is marked sent; if it fails, its attempt count increments and a later sweep tries again, up to 20 times. The delivery worker then POSTs the event to each subscribed endpoint (see Retry policy).

This is the canonical "outbox pattern" for at-least-once delivery. It survives process death between the database commit and the network send.

Headers on every delivery

POST /your-endpoint HTTP/1.1
Webhook-Id: 5dba8a3c-9b71-4f9b-9b9a-3b8b2a1c4d2e
Webhook-Timestamp: 1748000000
Webhook-Signature: t=1748000000,v1=<64-char hex hmac>
Content-Type: application/json

{ "id": "5dba8a3c-9b71-4f9b-9b9a-3b8b2a1c4d2e", "createdAt": "2026-05-28T12:00:00.000Z", "event": "risk.created", "data": { "risk": { … } } }

The body has four keys: id, createdAt, event (the event type) and data. There is no organisation id in it: an endpoint belongs to one organisation. Event types describes each key.

The signing scheme is HMAC-SHA256 over the literal string <Webhook-Timestamp>.<raw_body>. Use the raw request bytes, not the JSON-parsed payload. Full code samples in Verifying signatures.

Despite the header names, this is not the Standard Webhooks scheme (which signs <id>.<timestamp>.<body> and encodes the result in base64), so Standard Webhooks libraries will not verify these deliveries. Use the code in Verifying signatures.

Retry policy

AttemptDelay before retry
1 → 2~5 seconds
2 → 3~5 minutes
3 → 4~30 minutes
4 → 5~2 hours
after 5the event is abandoned for that endpoint

An event is tried up to 5 times for each endpoint. Every attempt carries the same body and Webhook-Id, and a new Webhook-Timestamp and signature made at the moment it is sent.

An endpoint whose last 20 delivery attempts all failed (attempts, not events: four abandoned events are enough) is turned off. It stays in your list with status auto_disabled; an admin re-enables it in the app after fixing the receiver, which resets the failure count. An attempt held back by the per-endpoint rate cap (see Endpoint constraints) doesn't count towards the 20.

What counts as success?

Any 2xx status. Your endpoint should:

  1. Verify the signature.
  2. Check the timestamp is recent (≤5 minutes).
  3. Check the body's id equals Webhook-Id, then check that id against your dedup table (idempotent handling).
  4. Store the event and its id.
  5. Return 2xx, then process the event asynchronously. The response timeout is 10 seconds.

If you return non-2xx, the worker retries. If you can't process the event (corrupted data, unknown event type), return 2xx anyway: a 2xx stops the retries, and the failure is yours to investigate from your own logs. Returning 4xx/5xx for an error that a retry can't fix just wastes retries.

Endpoint constraints

Secret management

Each endpoint has a secret used to compute the HMAC. The secret format is rrws_<43 base64url chars>.

One-shot reveal. The secret is shown once at endpoint creation. Copy it to your secret store immediately.

Rotation. An admin rotates the secret from the endpoint's page in the app. The new secret is shown once. For the next 24 hours every delivery is signed with both the old and the new secret (two v1= values in the signature header), so you can move your receiver to the new secret without dropping events; after that, only the new one signs. See Verifying signatures.

At rest. The server stores secrets encrypted with AES-256-GCM under a per-deployment key. Plaintext is never persisted.

Event selection

When an admin creates an endpoint in the app, they choose which event types it receives (for example risk.created, risk.escalated and review.overdue), and can change the selection later on the endpoint's page.

Subscribing to a subset reduces noise and limits what an attacker sees if your endpoint is ever compromised. Subscribe to everything during integration testing, then narrow once you know which events you actually consume.

Testing

Each endpoint has a "Send test event" button in the app that fires a synthetic event bypassing the outbox. The signature, headers, and body shape all match production - useful for verifying your receiver before any live event lands.

For local development, smee.io or ngrok work fine. Just remember the SSRF defence rejects loopback IPs — you need a public URL.

See also