Skip to main content

Overview

This guide walks you through implementing webhook endpoints to receive real-time notifications from the Nudj platform. You’ll learn how to configure webhooks, handle incoming requests, and implement best practices for production systems.

Prerequisites

Admin API Access

You need Admin API credentials to configure webhooks

HTTPS Endpoint

Your endpoint must use HTTPS: Nudj sends your auth header with every request and does not refuse an http:// URL for you

Event Processing

A system to handle and process incoming events

Authentication

Mechanism to verify webhook authenticity

Step 1: Configure Your Webhook

First, use the Admin API to configure your webhook endpoint:
The body is your organisation’s whole webhook list under webhookConfig: it replaces every webhook you created before, so send each one you want to keep. Nudj does not sign payloads; the headers you set here (such as Authorization and X-Webhook-Source above) are sent with every request, and your endpoint checks them.

Step 2: Implement Webhook Endpoint

Create an endpoint to receive and process webhook events:

Step 3: Implement Event Handlers

Create specific handlers for different event types:

Step 4: Error Handling and Retry Logic

Implement robust error handling to ensure reliable webhook processing:

Step 5: Testing Your Implementation

Test your webhook implementation thoroughly:

Step 6: Production Deployment

Security Checklist

  • Use valid SSL certificates
  • Enable HSTS headers
  • Disable HTTP fallback
  • Use strong cipher suites
  • Check the auth header you configured
  • Use environment variables for secrets
  • Implement rate limiting
  • Don’t rely on an IP allowlist: Nudj publishes no fixed IP ranges
  • Implement retry logic
  • Use dead letter queues
  • Add comprehensive logging
  • Set up monitoring and alerts
  • Process webhooks asynchronously
  • Implement connection pooling
  • Add caching where appropriate
  • Monitor response times

Monitoring and Logging

Common Integration Patterns

Real-time Notifications

Email Marketing Integration

Analytics Integration

Best Practices

Response Quickly

Return a 2xx within 15 seconds. Process heavy workloads asynchronously.

Handle Duplicates

Use webhook IDs to implement idempotent processing and prevent duplicate handling.

Validate Payloads

Always verify webhook authenticity and validate payload structure before processing.

Monitor Performance

Track processing times, error rates, and webhook delivery success rates.

Implement Retries

Handle transient failures gracefully with exponential backoff retry logic.

Log Everything

Maintain detailed logs for debugging and monitoring webhook processing.

Next Steps

Event Catalog

See every available webhook event and its specific payload.

Testing Guide

Learn how to trigger test events to verify your endpoint.