Guide APIs & integration

Webhooks explained

What webhooks are, how they differ from polling, and how to receive them securely and reliably.

Overview

A webhook is an HTTP callback: instead of your app repeatedly polling a provider for changes, the provider sends an HTTP POST to a URL you register whenever an event occurs. It’s the difference between refreshing your inbox and getting a notification.

Polling vs webhooks

  • Polling: simple, but wasteful and laggy — you ask constantly, mostly to hear “nothing changed”.
  • Webhooks: efficient and near-real-time, but you must run an endpoint and handle delivery quirks.

Receiving webhooks securely

  1. Verify the signature. Providers sign payloads (often HMAC). Compute the signature and compare — reject anything that doesn’t match. This prevents forged events.
  2. Use HTTPS so payloads aren’t readable in transit.
  3. Treat the payload as untrusted input and validate it.

Reliability

  • Respond fast (2xx) and process later. Do the real work asynchronously via a queue; providers often time out slow endpoints and retry.
  • Expect retries and duplicates. Make handling idempotent — processing the same event twice must be safe (dedupe on an event id).
  • Handle out-of-order delivery. Don’t assume events arrive in sequence; use timestamps or versioning.

Common mistakes

  • Doing heavy work synchronously in the handler and timing out.
  • Not verifying signatures (accepting spoofed events).
  • Assuming exactly-once delivery.

Last verified: August 2026. Technology and pricing change — always confirm current details with the vendor.

#API#webhooks#events

About Elysian Editorial Team

Editorial & engineering team

The Elysian Tech Leverage editorial team writes and reviews technical content on AI, automation, software, cloud and business systems. Every guide is fact-checked against primary sources and every tool and calculator is tested before publication.

AI & automationCloud architectureAPIs & integrationsDataCybersecurity fundamentals