Outbound webhook kinds
A tenant's outbound webhook declares one of eight kinds: generic, zapier, make, n8n, hubspot, salesforce, or slack. The kind shapes the payload envelope — Slack receives a formatted message block, Salesforce receives a create-record payload, generic receives the raw event — so the receiving system does not have to guess. Each webhook subscribes to specific events or to everything with *.
Delivery and verification
Every delivery carries identity headers (x-que-delivery, x-que-event, x-que-timestamp) and a cryptographic signature header, x-que-signature. Deliveries are capped at 256 KB request and response with a 10-second timeout, and protected headers (authorization, host, user-agent, and the signature headers themselves) cannot be set by webhook configuration. Deliveries are tenant-scoped: the fanout finds enabled webhooks for one company and dispatches only that tenant's events.
Signature format and verification
When a webhook has a secret, every delivery is signed. The header value is a single string with two comma-separated parts: a Unix timestamp in seconds (t=) and a 64-character hex HMAC-SHA-256 over the literal string timestamp.body (v1=). The signature is only computed when the webhook has a secret, and the body it signs is the exact JSON payload that arrives — including envelope shaping for the webhook's kind.
x-que-signature: t=1787011200,v1=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855Verify it on your side before trusting the payload: parse t= and v1=, reject anything whose timestamp is older than five minutes (QUE's own verifier uses a 300-second tolerance), recompute HMAC-SHA-256 of t + "." + body with your secret, and compare with a constant-time comparison — a naive string compare leaks timing information that an attacker can exploit.
import crypto from "node:crypto";
export function verifyQUE(payload: Buffer, header: string, secret: string): boolean {
const match = /^t=(d+),v1=([a-f0-9]{64})$/.exec(header);
if (!match) return false;
const [, t, v1] = match;
const age = Math.abs(Math.floor(Date.now() / 1000) - Number(t));
if (age > 300) return false; // stale signature
const expected = crypto
.createHmac("sha256", secret)
.update(t + "." + payload.toString("utf8"))
.digest("hex");
return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(v1));
}The seven endpoint kinds
| Kind | Payload envelope | Typical use |
|---|---|---|
| generic | Raw QUE event JSON | Your own receiver, custom tooling |
| zapier | Zapier catch-hook shape | Zapier workflows |
| make | Make custom webhook shape | Make (Integromat) scenarios |
| n8n | n8n webhook shape | n8n workflows |
| hubspot | HubSpot create-contact/ticket shape | HubSpot CRM sync |
| salesforce | Salesforce create-record shape | Salesforce record sync |
| slack | Slack formatted message block | Channel notifications |
Failed deliveries and retry
A delivery that fails is not abandoned. The attempt is recorded in webhook_deliveries with a scheduled retry 60 seconds later, and QUE re-dispatches failed deliveries on the next worker cycle until a success lands. Every attempt — the event, the target URL, the response status, and the timestamp — is visible in the delivery log, so an endpoint that fails repeatedly stays visible rather than silently dying.
Inbound sinks
Two inbound webhook receivers exist. The Stripe sink verifies stripe-signature before applying payment updates to bookings. The Alertmanager sink is fail-closed: without a configured secret it refuses every request with 401, and with a secret it accepts only payloads carrying the exact signature header. Both are sinks — they consume and record; neither forwards anything onward.
Delivery history
Every delivery attempt is recorded: the event, the target URL, the response status, and the timestamp. Operators can list deliveries per webhook and re-test any endpoint. A webhook that fails repeatedly stays visible in the log rather than silently dying.
Idempotency is your responsibility
Two guarantees to build on, but not assume: QUE signs every delivery with a timestamp and will retry failures at 60-second intervals, while delivery history records every attempt. Signatures older than five minutes are rejected at verification time, and duplicate deliveries can happen — design consumers to be idempotent on x-que-delivery.