Skip to main content

Overview

Webhooks push event notifications to your backend as they happen, so you don’t have to poll the API for session or guardrail activity. Each delivery is a signed HTTP POST to an endpoint URL you configure in the admin panel.

Event types

Every delivery shares a common envelope:
id is a unique delivery UUID — use it to deduplicate retried deliveries (see Retry policy below). data holds the event-specific payload:
end_reason is one of completed, timeout, error, abandoned.
action is one of blocked, modified, warned.
status is indexed or failed.

Setting up an endpoint

  1. Open Workspace settings → Webhooks in the admin panel.
  2. Click Add endpoint and enter the HTTPS URL your backend exposes.
  3. Select which event types to receive — you don’t have to subscribe to all eight.
  4. Save. The panel shows a signing secret once — store it immediately. It’s used to verify incoming deliveries (see below).
The signing secret is shown only once at creation time. If you lose it, regenerate a new one from the endpoint’s settings — this invalidates the old secret immediately.

Signature verification

Every delivery is signed with HMAC-SHA256 so you can verify it genuinely came from Humain and was not tampered with in transit. Verifying the signature is mandatory — never process a webhook payload before verifying it. Signing scheme:
Two headers carry the signature and timestamp: Reject the request if the timestamp is more than 300 seconds from the current time — this prevents replay attacks with a captured payload. Each SDK ships a verification helper so you don’t write the HMAC comparison yourself.

JavaScript / TypeScript

Python

Go

.NET

Webhooks are a server-side feature — there is no C library helper. Devices don’t receive webhook deliveries; only backends with a publicly reachable HTTPS endpoint do.

Retry policy and idempotency

If your endpoint doesn’t respond with a 2xx status within 10 seconds, the delivery is retried with exponential back-off: immediately, then after 1 minute, 15 minutes, 1 hour, and 6 hours — five attempts total over roughly 7 hours. After the final attempt fails, the delivery is marked failed and visible in the endpoint’s delivery log. An endpoint that fails 20 consecutive deliveries is automatically disabled. You’ll need to re-enable it from the admin panel after fixing the underlying issue. Because retries resend the same event, your handler must be idempotent. Use the envelope’s id field to deduplicate:

Testing your endpoint

Each webhook endpoint has a Send test event button in the admin panel. It sends a session.opened payload with placeholder data, signed with the endpoint’s real secret, so you can verify your signature verification and handler logic end-to-end without needing a live session. The delivery log on the endpoint’s detail page shows the request sent, the response your server returned, and the latency — useful for debugging both test and production deliveries.