All Glossary Terms
HTTP & Concept

What is a webhook vs callback?

A callback is any function called back when an event occurs; a webhook is the specific case of an HTTP POST callback over the network. Callback is a generic programming concept — `button.onClick(fn)` registers a callback, in-process, no network involved. A webhook is the network-distributed analog: one system POSTs to a URL the other system has registered. Every webhook is a callback; most callbacks are not webhooks. In practice the terms blur — older API docs use "callback URL" and "webhook URL" interchangeably. When docs say "register a callback URL," they mean a webhook URL; when they say "pass a callback function," they mean an in-process reference.

These two terms get used interchangeably and sloppily. The cleanest distinction:

- Callback is a generic programming concept — a function passed to another function, to be called when something happens. button.onClick(() => alert('hi')) registers a callback. So does fs.readFile(path, (err, data) => ...). The key idea is "you give me a thing to call later." This concept exists in every programming language, in-process, no network involved. - Webhook is a specific *kind* of callback — one that happens over HTTP, between separate systems, where one system POSTs to a URL the other system has registered. A webhook is the network-distributed analog of an in-process callback.

So every webhook is a callback (a callback that happens to be an HTTP POST), but most callbacks are not webhooks (most are in-process function references).

In casual usage the terms blur. Twilio calls some of its features "callbacks" and some "webhooks" — referring to the same network mechanism. Older API documentation uses "callback URL" and "webhook URL" interchangeably. AWS uses "callback" in some Lambda contexts to mean an HTTP webhook. Don't read too much into the word choice; check the docs for what's actually being sent.

For practical purposes when reading docs:

- If the docs say "register a callback URL" — they mean a webhook URL. - If the docs say "the webhook will be sent to your endpoint" — they mean an HTTP POST. - If the docs say "pass a callback function" without mentioning URLs or HTTP — they mean an in-process function, not a network thing.

The distinction matters when designing your own APIs. If you're building a system that needs to notify external services of events, you have two choices: webhooks (the external service runs an HTTP server, you POST to it) or polling (the external service repeatedly asks you "anything new?"). The word "callback" in this context almost always means webhook, but be explicit in your docs to avoid confusion.

A historical note: the term "WebHook" was coined by Jeff Lindsay in 2007 to specifically distinguish HTTP-POST-based callbacks from the older in-process programming concept. The "Web" prefix is the key — it specifically means "callbacks but over the web." Twenty years on, the prefix is doing less work than it did then because the network case is now the default; "callback" alone often implies webhook in API docs.

See Webhook vs Callback in real traffic

WebhookWhisper captures every webhook with full headers, body, signature, and timing — so concepts like webhook vs callback stop being abstract and become something you can inspect.

Start Free