Skip to main content

Configure a webhook

Open Settings → Webhooks. Enter a public HTTPS destination, select events, and store the secret for signature verification. Inspect deliveries in the provided history. Currently wired processes emit client.created, client.stage_changed, pipeline.deal_stage_changed, pipeline.deal_won, and pipeline.deal_lost. The settings event picker contains additional names; this does not guarantee that every product process already emits a corresponding event. In particular, this is not a complete property change feed.

Verify the request

Every attempt includes these headers: The new signature authenticates the UTF-8 encoding of JSON.stringify([timestamp, event, deliveryId, rawBody]). All four elements are strings, in that order. timestamp is the exact decimal text from t; event and deliveryId come from the corresponding headers. rawBody is the unchanged UTF-8 request body, including whitespace. The JSON array makes field boundaries unambiguous. Use your existing webhook secret as the HMAC key, without decoding it. v1 identifies this envelope’s HMAC scheme within the new header. The body format is unchanged:

Node.js receiver example

Read the body once with await request.text(), before parsing JSON or applying middleware that changes it. Pass request.headers and a configured toleranceSeconds to this function. Choose a finite tolerance using measured request transit time plus your maximum clock skew; monitor those measurements and synchronize the receiver’s clock. The function rejects timestamps that are too old or too far in the future. Verify on receipt, before queueing local work; do not use the event’s creation time as the delivery timestamp.
A null result means reject the request without processing it. Only after verification should you parse rawBody and dispatch using the returned authenticated event and deliveryId.

Deduplicate before effects

Freshness limits the replay window; it does not prevent repeated requests inside that window. Use a persistent unique key consisting of your configured webhook endpoint’s identity and the authenticated deliveryId. Do not use the timestamp, signature, or an ID from the parsed body as that key. In one database transaction, insert that key and durably enqueue the event (or apply transactional business changes). A concurrent duplicate must resolve through the same unique constraint. Return 2xx for an already committed acceptance without repeating its effects. Roll back the key if acceptance fails and return a non-2xx response so a retry can succeed. For external side effects, pass the same idempotency key downstream; an in-memory set or a separate check-then-insert is insufficient. Keep deduplication records throughout your business idempotency horizon, covering the last possible delivery attempt plus the freshness tolerance. Job delays can extend retries beyond the nominal backoff schedule, so do not expire records solely from the original event time. Distinct endpoint deliveries have distinct IDs; the delivery ID is not a global business event ID.

Transition from the legacy header

The legacy header, secret, and body remain unchanged so existing receivers continue to work. Both signature headers are sent on every attempt, including retries of deliveries queued before this change. No removal date for the legacy header is introduced by this change. Update your receiver to require x-dealpipe-signature-v2, verify the signed metadata and freshness, and deduplicate as above. Once migrated, reject a missing or invalid new header; never fall back to the legacy signature, even if it is valid. Such a fallback would allow a captured request to bypass freshness checks. Receivers that verify only the legacy header remain without authenticated freshness or delivery metadata.

Responses and retries

Return a 2xx status after accepting the message reliably. Unsuccessful deliveries are retried for up to six total attempts. Intended delays are 1, 5, 30, 240, and 1440 minutes; actual execution depends on the delivery job. Redirects are not followed. Disabled destinations receive no further deliveries. Each retry uses a fresh attempt timestamp and signature with the same delivery ID and body. A retry of an old event can therefore pass the freshness check, while the persistent delivery key prevents duplicate effects.