Webhooks
Huudis fires webhook events to URLs you control so you can react to identity changes in real time — users signing up, joining workspaces, enrolling MFA, granting OIDC consent.
This page is the API reference for webhooks: event envelope, signature recipe, retry policy, who receives what, and the full event catalog. For managing subscriptions themselves, see Webhook subscriptions. For the portal walkthrough, see Portal → Webhooks.
Event payload shape
Every webhook is a POST to your endpoint with this body:
{
"id": "evt_01KPG30TXM4N5Q8R1S4T6V8X0Y",
"type": "huudis.account.member_added.v1",
"accountId": "acc_01KPG40…",
"occurredAt": "2026-05-12T10:42:00.123Z",
"data": {
/* the resource that triggered the event */
},
"metadata": {}
}
| Field | Notes |
|---|---|
id |
Unique event ID. Use for deduplication on your side — stable across retries. |
type |
huudis.<resource>.<action>.v<n> — versioned, so additive payload changes don't break consumers. |
accountId |
The workspace the event is about, or null for a platform event (see Who receives an event). |
occurredAt |
When the event happened, not when you received it. |
data |
The resource the event is about. Shape depends on type — see the per-event pages. |
metadata |
Reserved for delivery context; {} today. |
Payloads never carry a token, a secret or a hash.
Headers
Every delivery carries:
Content-Type: application/json
User-Agent: Huudis-Webhooks/1.0
X-Huudis-Signature: t=1747033200,v1=8c4a…hexhmac
X-Huudis-Event-Id: evt_01KPG30TXM4N5Q8R1S4T6V8X0Y
X-Huudis-Event-Type: huudis.account.member_added.v1
X-Huudis-Subscription-Id: whs_01KPG30TXM…
The signature is HMAC-SHA256 over <t>.<raw-body> with your subscription's secret.
Signature verification
The SDKs ship a one-call helper. It returns true when the signature matches and the timestamp is within 5 minutes; parse the body yourself after it passes:
// Node
import { verifyWebhookSignature } from '@forjio/huudis-node';
app.post('/webhooks/huudis', express.raw({ type: 'application/json' }), (req, res) => {
const ok = verifyWebhookSignature(
req.body, // the raw body bytes
req.header('X-Huudis-Signature') ?? '',
process.env.HUUDIS_WEBHOOK_SECRET,
);
if (!ok) return res.status(401).end();
const event = JSON.parse(req.body.toString('utf8'));
// … handle event
res.status(200).end();
});
# Python
import json
from huudis import verify_webhook_signature
if not verify_webhook_signature(raw_body, headers.get("X-Huudis-Signature", ""), WEBHOOK_SECRET):
return 401
event = json.loads(raw_body)
// Go
if !huudis.VerifyWebhookSignature(body, r.Header.Get("X-Huudis-Signature"), secret, nil) {
http.Error(w, "bad signature", http.StatusUnauthorized)
return
}
Without the SDK:
- Parse the header.
X-Huudis-Signature: t=<timestamp>,v1=<hex>. - Construct the signed string:
<timestamp>.<raw-body-bytes>. - Compute
HMAC-SHA256(secret, signed)— compare hex withv1. Use constant-time comparison. - Reject if
now - timestamp > 5 minutes(replay protection).
Retry policy
A delivery succeeds when your endpoint answers 2xx within 10 seconds. Anything else — another status, a redirect (never followed), a timeout, a refused connection, a blocked address — is a failed attempt, retried on this schedule:
| Attempt | Delay since previous |
|---|---|
| 2 | 1 minute |
| 3 | 5 minutes |
| 4 | 25 minutes |
| 5 | 2 hours |
| 6 | 12 hours |
After the 6th failed attempt the delivery is dead. Use POST /v1/account/webhook-subscriptions/deliveries/:id/replay to retry it by hand.
Huudis sends only to https:// URLs on public addresses. A URL whose name resolves to a private, loopback or link-local address (for example 10.x, 127.0.0.1, 169.254.169.254) is refused when you save it (400 BLOCKED_TARGET), and an attempt to one fails with blocked: … in the delivery log. The address is checked again when each request connects. A 3xx answer is a failed attempt (redirect not followed), so give the final URL.
Ordering
Deliveries are not strictly ordered. Retries especially can land after a later event's first attempt. Idempotently process by event id and consult occurredAt if you need happens-before.
Who receives an event
A subscription belongs to one workspace, and it only ever receives events about that workspace:
- A workspace's events — its members, its IAM (policies, roles), its services, the OIDC sign-ins acting in it, consents to the OIDC clients it owns, impersonation by its admins — carry the workspace's id in
accountIdand go to that workspace's subscriptions. - A user's own events — signup, MFA, disable / enable, Huudis dashboard sign-ins, deletion — go to every workspace the user belongs to, as one event per workspace (each with its own
idandaccountId). - Platform events (
accountId: null) —huudis.account.created.v1, and a platform copy of each user event and workspace-deletion event — go only to Forjio's own workspaces, never to a customer's. You never receive an event about someone outside your workspaces.
Event catalog
Events use the pattern huudis.<resource>.<action>.v<n>. All of them are emitted; the live catalog (with descriptions) is at GET /v1/account/webhook-subscriptions/events/catalog.
Users
| Event | When |
|---|---|
huudis.user.created.v1 |
A user was created — signup, social sign-in, direct add or invite accept. |
huudis.user.disabled.v1 |
A Forjio operator disabled a user. |
huudis.user.enabled.v1 |
A disabled user was re-enabled. |
huudis.user.deletion_scheduled |
A user scheduled self-serve deletion (30-day grace). |
huudis.user.deletion_cancelled |
A user cancelled a pending deletion. |
huudis.user.deleted |
A user was hard-deleted after the grace lapsed. |
Sessions
| Event | When |
|---|---|
huudis.session.created.v1 |
A user signed in (Huudis dashboard, or an OIDC sign-in into a product). |
huudis.session.refreshed.v1 |
An OIDC session's refresh token was rotated. |
huudis.session.revoked.v1 |
A session ended before it expired. |
Workspaces
| Event | When |
|---|---|
huudis.account.created.v1 |
New workspace (a platform event). |
huudis.account.member_added.v1 |
A user joined the workspace. |
huudis.account.member_role_changed.v1 |
A member's role changed. |
huudis.account.member_removed.v1 |
A member was removed. |
huudis.account.service_enabled.v1 |
The workspace opted into a Forjio product. |
huudis.account.service_disabled.v1 |
The workspace switched a Forjio product off. |
huudis.account.deletion_scheduled |
An owner scheduled the workspace's deletion (30-day grace). |
huudis.account.deletion_cancelled |
A pending deletion was cancelled. |
huudis.account.deleted |
The workspace was hard-deleted (a platform event: its own subscriptions go with it). |
OIDC
| Event | When |
|---|---|
huudis.oidc.consent_granted.v1 |
A user consented to one of your OIDC clients. |
huudis.oidc.consent_revoked.v1 |
A consent to one of your OIDC clients was revoked. |
IAM
| Event | When |
|---|---|
huudis.iam.policy_attached.v1 |
Policy attached to a principal. |
huudis.iam.policy_detached.v1 |
Policy detached from a principal. |
huudis.iam.policy_updated.v1 |
A customer-managed policy changed. |
huudis.iam.role_assumed.v1 |
A role was assumed. |
MFA
| Event | When |
|---|---|
huudis.mfa.enrolled.v1 |
A user verified a new MFA device. |
huudis.mfa.removed.v1 |
A user removed an MFA device. |
End-user operations
| Event | When |
|---|---|
huudis.ops.impersonation_started.v1 |
An admin of your workspace started impersonating one of its end-users. |
huudis.ops.impersonation_ended.v1 |
The impersonation session was ended. |
Versioning
Event types carry a major version suffix (.v1). Additive changes (new fields, new event types) ship within the same major version. Breaking changes — field removal or renamed fields — bump to .v2. We'd announce a deprecation window of at least 6 months and run both versions in parallel.
Subscribe to the explicit versioned types you handle (huudis.user.created.v1); don't pattern-match on huudis.user.*.
Next
- Webhook subscriptions resource — CRUD on your endpoint registrations.
- Individual event pages in this section.
- SDK overview — the verify-webhook helpers.