Webhooks allow your application to receive HTTP notifications in real time whenever events occur across the Essal suite. Instead of polling the API, you register an endpoint and Essal pushes event payloads to it automatically.
Creating a Webhook
Response
Copy the secret immediately — it is only shown at creation time.
Verifying Payloads
Every webhook delivery includes an X-Essal-Signature header. Verify it to ensure the request is genuine:
Always use timingSafeEqual to prevent timing attacks.
Retries and Delivery Guarantees
Essal delivers events with at-least-once guarantees. If your endpoint returns a non-2xx response or times out (10-second limit), Essal retries up to 5 times with exponential backoff over 24 hours.
Make your webhook handler idempotent using the evt.id field to deduplicate retried deliveries.
Respond quickly with 200 OK and process the event asynchronously. A slow handler increases the chance of timeouts and retries.
Managing Webhooks