Result webhooks
A result webhook tells your server when a case changes status, gets a new requirement, reaches a workflow outcome or has a node that failed.
verification.updated, is unchanged.Endpoints
| Method and path | Purpose |
|---|---|
GET /webhooks | List the endpoints of the selected environment. |
POST /webhooks | Create an endpoint. The response shows the secret once. |
GET, PATCH, DELETE /webhooks/{id} | Read, edit or delete an endpoint. |
POST /webhooks/{id}/rotate-secret | Replace the secret. The response shows the new secret once. |
GET /webhooks/{id}/deliveries | Deliveries, newest first. |
POST /webhook-deliveries/{id}/redeliver | Queue a new delivery of the same payload. |
An endpoint has url, events (at least one), active and description. It receives events of cases in its own workspace and environment, so sandbox cases deliver only to sandbox endpoints. The URL passes the same destination checks as a connection. The secret is stored encrypted.
Events
Event Sent when data case.status_changedThe case status changes. case_id, status case.requirement_addedThe workflow adds a conditional requirement. case_id, node_id case.outcomeThe workflow reaches its outcome. case_id, outcome, node_id, and for a reason: reason and, when in review, review_reason node.failedA workflow node fails. case_id, node_id, reason
Fields without a value are left out. A case.outcome delivery for a case sent to review:
{
"id": "8783bc37-9afe-514e-b6c3-516c69b2bb0f",
"type": "case.outcome",
"created_at": "2026-11-21T22:15:20.000000Z",
"environment": "sandbox",
"data": {
"case_id": "W9GIglaRU_8fZg5IyTuMi",
"outcome": "in_review",
"node_id": "call_api",
"reason": "Risk service asked for a review",
"review_reason": {
"node_id": "call_api",
"rule_index": 0,
"reason": "Risk service asked for a review"
}
}
}
A case.status_changed delivery:
{
"id": "fbc51a78-9606-5ced-a322-45b4ef0d392b",
"type": "case.status_changed",
"created_at": "2026-11-21T22:15:20.000000Z",
"environment": "sandbox",
"data": {
"case_id": "W9GIglaRU_8fZg5IyTuMi",
"status": "in_progress"
}
}
The body is the event itself. Read the current state of the case with your own credentials before acting on it.
Headers
Header Value X-Webhook-IdThe endpoint ID. X-Webhook-EventThe event, such as case.outcome. X-Webhook-DeliveryThe delivery ID. Retries of a delivery keep it; a redelivery gets a new one. X-Webhook-TimestampUnix time in seconds when the delivery was signed. X-Webhook-Signaturesha256= followed by the hex HMAC SHA-256 of the timestamp, a period and the raw body, keyed with the endpoint secret.
The payload id stays the same when a delivery is retried or redelivered. Use it to ignore repeats.
Verify the signature
Read the raw body before parsing it, compute the HMAC SHA-256 of <X-Webhook-Timestamp>.<raw body> with the whole secret, prefix it with sha256=, compare in constant time, and reject timestamps more than five minutes from your clock. The scheme matches API calls except for the prefix and the header names.
Node.js:
import {createHmac, timingSafeEqual} from 'node:crypto';
export function verifyCredflareWebhook(rawBody, timestamp, signature, secret, now = Date.now() / 1000) {
const expected = 'sha256=' + createHmac('sha256', secret).update(`${timestamp}.${rawBody}`).digest('hex');
const fresh = Math.abs(now - Number(timestamp)) < 300;
const received = Buffer.from(String(signature ?? ''));
return fresh && received.length === expected.length && timingSafeEqual(received, Buffer.from(expected));
}
Python:
import hashlib
import hmac
import time
def verify_credflare_webhook(raw_body: bytes, timestamp: str, signature: str, secret: str, now: float | None = None) -> bool:
now = time.time() if now is None else now
expected = "sha256=" + hmac.new(secret.encode(), timestamp.encode() + b"." + raw_body, hashlib.sha256).hexdigest()
return abs(now - int(timestamp)) < 300 and hmac.compare_digest(expected, signature or "")
PHP:
<?php
function verifyCredflareWebhook(string $rawBody, string $timestamp, string $signature, string $secret, ?int $now = null): bool
{
$expected = 'sha256='.hash_hmac('sha256', $timestamp.'.'.$rawBody, $secret);
return abs(($now ?? time()) - (int) $timestamp) < 300 && hash_equals($expected, $signature);
}
These functions were run against a case.outcome delivery and its endpoint secret. They return true for it, and false when one byte of the body changes, when the secret is wrong, or when the timestamp is more than five minutes old.
Retries and redelivery
- Answer with a
2xx status once the event is stored. Any other answer is retried, up to six attempts in all: after 10 seconds, 1 minute, 5 minutes, 30 minutes and 2 hours. - After 15 failed deliveries in a row, the endpoint is switched off. Turning it on again resets the count.
- Redelivering queues a new delivery of the same payload with a new
X-Webhook-Delivery and a new signature. The payload id does not change.
Deliveries list the event, its payload id as event_id, the status, the attempts and your last response status:
{
"success": true,
"message": "Operation successful",
"data": {
"items": [
{
"id": 2,
"event": "case.status_changed",
"event_id": "a94f7983-501b-512a-93a1-1e5682a2a016",
"status": "delivered",
"attempts": 1,
"response_status": 200,
"created_at": "2026-11-21T22:06:31.000000Z",
"delivered_at": "2026-11-21T22:06:31.000000Z"
},
{
"id": 1,
"event": "case.outcome",
"event_id": "000e173a-8580-5582-ac84-6a50616cc25d",
"status": "delivered",
"attempts": 1,
"response_status": 200,
"created_at": "2026-11-21T22:06:31.000000Z",
"delivered_at": "2026-11-21T22:06:31.000000Z"
}
],
"current_page": 1,
"last_page": 1,
"per_page": 25,
"total": 2
}
}