Overview
Webhook Implementation
End-to-end guide: configuring endpoints, checking your auth header, handling retries.
Admin API: Webhooks
The endpoints for configuring webhooks and reading delivery logs.
Admin API endpoints
The first three have reference pages in the Admin API → Webhooks group in the sidebar; the retry endpoint has none yet. A failed delivery can also be retried by hand from Settings → Developer → Webhooks → Webhook Logs in the admin.
Delivery model
- One webhook per event. Nudj calls the first webhook that subscribes to the event (when it is switched on and its entity filter lets the event through). Nudj-managed system webhooks, which the API does not list, come before yours. A second webhook on the same event is not called.
- One request per event. Nudj sends the event as JSON with the webhook’s HTTP method (
POSTfor webhooks created in the admin; aGETcarries no body) and waits up to 15 seconds for an answer. Any2xxcounts as delivered. - A stable id. Every payload carries a top-level
id, built from your organisation, the event type and the event’s own nonce, so a retry of the same event carries the sameid. Dedupe on it. - Retries on busy or failing receivers. When your endpoint answers
429,500,502,503or504(a timeout counts as504), Nudj queues the delivery and tries again with backoff, up to the webhook’smaxRetriesmore times (3 by default). Any other answer to the first attempt is not retried; once a delivery is queued, the queue retries any non-2xxanswer. - Your headers, no signature. Nudj does not sign payloads. Every request carries the custom headers you configure, such as
Authorization: Bearer <your secret>; check that header in your handler before processing. - Monthly quota. Deliveries count against your plan’s monthly webhook allowance; once it is used up, further deliveries that month are skipped.
- Ordering is not guaranteed. A retried delivery can arrive after later events, so make your handler order-independent.
Events you can subscribe to
In the admin you can switch on these events for a webhook:
See the webhook event catalogue for each event’s payload.
Idempotency
Every webhook includes the stableid described above. The recommended pattern:
- After checking your auth header, claim the
idatomically under a token only this request knows (e.g. RedisSET NXwith a short TTL such as 5 minutes, so a crashed handler frees it); once done, keep theidfor 24 hours. - If the
idis already done, return200; if it is still processing, return503so Nudj tries again later. - Process the event well inside the claim’s TTL, then mark the
iddone. If processing fails, release the claim and return500or503so Nudj retries. Mark or release the claim only while it still holds your token, so a slow request never overwrites or frees a newer one.
id as the idempotency key of the services you call, or by recording the effect and the “done” mark in one database transaction.
Configuration flow
1
Register an endpoint
In the admin, open Settings → Developer → Webhooks, enter your receiving URL (starting with
https://), pick the events and add any auth header under Advanced Settings. Through the API, call PUT /webhooks/configs with the whole list. See the Admin API reference for the request schema.2
Verify delivery
Trigger one of the events and open Webhook Logs in the admin, or call
GET /webhooks/logs. Every attempt is logged with the outgoing payload, target URL, response status code and error body.3
Handle retries and dedupe
Follow the patterns in Webhook Implementation: check your auth header, dedupe on
id, reply 2xx on success, and reply 429, 500, 502, 503 or 504 when you want Nudj to try again later.Related
Webhook Implementation Guide
Full handler walkthrough: auth headers, retries, debugging.
Admin API: Webhooks
OpenAPI reference for the webhook endpoints.
Errors
Error envelope for webhook config mutations.
Authentication
Admin API authentication for
/webhooks/* endpoints.
