Skip to main content
Nudj sends outbound webhooks to your systems when tracked events fire in the platform. This page is the API-reference overview. For payload shapes, handlers and debugging, see the Webhook Implementation Guide.

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 (POST for webhooks created in the admin; a GET carries no body) and waits up to 15 seconds for an answer. Any 2xx counts 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 same id. Dedupe on it.
  • Retries on busy or failing receivers. When your endpoint answers 429, 500, 502, 503 or 504 (a timeout counts as 504), Nudj queues the delivery and tries again with backoff, up to the webhook’s maxRetries more times (3 by default). Any other answer to the first attempt is not retried; once a delivery is queued, the queue retries any non-2xx answer.
  • 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 stable id described above. The recommended pattern:
  1. After checking your auth header, claim the id atomically under a token only this request knows (e.g. Redis SET NX with a short TTL such as 5 minutes, so a crashed handler frees it); once done, keep the id for 24 hours.
  2. If the id is already done, return 200; if it is still processing, return 503 so Nudj tries again later.
  3. Process the event well inside the claim’s TTL, then mark the id done. If processing fails, release the claim and return 500 or 503 so 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.
The claim stops two copies of one event running at the same time. It does not make the work exactly-once: a retry after a failure, or after the claim expired, runs your handler again, even if some of its side effects had already happened. Make each side effect safe to repeat, for example by passing the 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.

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.