Webhooks API Best Practices Delivery Events Developer Guide

How to Receive Webhooks Reliably: Six Tips for Developers

By Nimana · Last updated November 16, 2026 · 4 min read

Webhooks tell your app what happened to every message. Learn six tips for receiving them reliably: respond fast, handle duplicates, plan for retries, and more.

Why This Matters

Sending a message is only half the story. You also want to know whether it was delivered, whether the customer read it, and whether they replied. A webhook gives you that. When something happens, the service sends an HTTP request to a URL on your server, so your app can react immediately instead of asking again and again.

The catch is that a webhook endpoint is a promise: the service expects it to be there and to answer quickly. A slow or fragile endpoint loses events. These six habits keep yours dependable.

What Webhooks Are Useful For

  • Confirming delivery. Mark an order notification as delivered when the event arrives.
  • Triggering a fallback. If a text message fails, try another channel.
  • Handling replies. Answer a customer, or open a support ticket, when an incoming message arrives.
  • Cleaning your email list. Stop sending to addresses that bounce.
  • Watching your connections. Get alerted when a messaging session disconnects, before messages start failing.

Six Tips for Reliable Webhooks

1. Respond quickly, process later

Services time out if your endpoint is slow, and then treat the delivery as failed. Reply with a 200 OK as soon as you receive the event, and do the real work in a background queue.

// Good: acknowledge immediately, process later
app.post('/webhook', (req, res) => {
  const event = req.body;
  queue.add('process-webhook', event); // background job
  res.status(200).json({ received: true });
});

Avoid doing the heavy work before you answer:

// Avoid: blocks until processing completes
app.post('/webhook', async (req, res) => {
  await processEvent(req.body); // might take too long
  res.json({ received: true });
});

2. Expect the same event more than once

Most services deliver an event again if they are not sure you received it. Give every event a one-time pass by checking its id:

app.post('/webhook', async (req, res) => {
  const eventId = req.body.id;
  // Already processed? Just acknowledge it
  const exists = await db.webhookEvents.findOne({ eventId });
  if (exists) {
    return res.status(200).json({ received: true });
  }
  // Store it, then process it
  await db.webhookEvents.create({ eventId, data: req.body });
  await processEvent(req.body);
  res.status(200).json({ received: true });
});

3. Plan for retries

If your endpoint returns an error or times out, the service will usually try again a few times, with growing delays. Find out how many attempts it makes, because after the last one the event may be marked failed. A good service lets you look up failed deliveries so you can recover them.

4. Check that events are genuine

Anyone who finds your webhook URL can send fake events to it. Where the service signs its requests, verify the signature. Where it does not, restrict the endpoint to the service's IP addresses, or use a secret, hard-to-guess URL path.

5. Test before you go live

Use a webhook testing tool or a request inspector to send sample events to your endpoint. Check how your code handles each event type, a duplicate, and a slow response, before real customers are involved.

6. Log and monitor

Record every event you receive and what you did with it. When a customer says "I never got my message", your logs are the fastest way to find out why. Set up an alert if your endpoint starts returning errors.

Common Mistakes

  • Doing slow work before replying, which causes timeouts and repeat deliveries
  • Not handling duplicates, which can send a customer two follow-ups
  • Leaving the endpoint open to anyone, with no check that events are real
  • Never testing the unhappy paths, such as a failed delivery or a bounce

How SendAPI Helps

SendAPI delivers events for every channel to the same place, so one endpoint can follow a message wherever it goes:

  • Events for WhatsApp, SMS, and email, including sent, delivered, read, received, failed, bounced, opened, and clicked, plus session connected and disconnected
  • Automatic retries with exponential backoff: 4 attempts in total, with delays of 5 seconds, 30 seconds, and 2 minutes between them
  • A deliveries endpoint (GET /v1/webhooks/{id}/deliveries) to inspect what was sent to your webhook and recover failed events
  • A Webhook Testing Tool to check your endpoint before you go live
  • Simple setup: add your webhook URL in the Dashboard Settings, with 2 webhooks on the Starter plan and 10 on Growth

SendAPI's HTTP client times out after 10 seconds, and its production checklist recommends replying with 200 OK within 5 seconds. Webhook signature verification will be available once SDK support arrives. Until then, restrict your endpoint by IP or use a secret URL path.

All of this comes with WhatsApp, SMS, OTP, and email under one API from $9.99 a month.