Skip to main contentSkip to navigation
Developers & APIs · W

Webhook

A webhook is an automated HTTP callback with which one system notifies another of an event in real time. As soon as the triggering event happens, an incoming payment or a new record for instance, the source system sends an HTTP request of its own accord to a pre-configured URL at the target system and passes the relevant data in the request body. Unlike classic retrieval by polling, the target system does not have to ask repeatedly but is notified by the event, which makes webhooks a core building block of modern integration and automation. Because no unnecessary empty requests arise and the notification happens nearly immediately, webhooks are both resource-saving and quick to respond, provided the receiving endpoint is run and secured reliably.

Also known as: HTTP callback, web callback, reverse API

What is a webhook?

A webhook reverses the usual communication pattern. With a normal API a client actively requests data from the server. With a webhook it is the other way round: the server calls the client as soon as something happens. That is why a webhook is also called a reverse API or HTTP callback.

The process is simple. The receiving system provides a publicly reachable endpoint URL and registers it with the source system for particular event types. When one of those events occurs, the source system sends an HTTP POST request to that URL, whose body usually holds the event data as JSON.

The decisive advantage is real-time capability with minimal resource use: data flows exactly when there is something new, instead of creating load and delay through constant polling.

Webhook versus polling

In polling, a system queries an API repeatedly at fixed intervals to check whether new data is available. That is simple to build but wastes resources, since most requests return nothing new, and inevitably creates a delay between event and reaction.

A webhook solves both problems. There are no empty requests, and notification is almost immediate. The price is slightly higher complexity: the receiving system has to run a reachable endpoint, secure incoming requests and be prepared for delivery failures.

For event-driven scenarios the webhook is therefore almost always the more efficient choice, while polling suits rare or uncritical queries. In practice the two approaches are occasionally combined: webhooks deliver events in real time, and occasional polling serves as a safety net to catch up any notifications that were missed.

Security and reliability

Because a webhook endpoint is publicly reachable, it has to be protected against misuse. A signature check is common: the source system signs the payload with a secret key, the receiving system recomputes the signature and accepts only matching requests. Every notification's authenticity can thus be verified.

Retries and idempotency are decisive for reliability. If a delivery fails, the source system should try the call again. The receiving system in turn has to expect the same notification more than once and process it idempotently, so no event takes effect twice.

It is also advisable to accept incoming webhooks quickly and move the actual processing asynchronously into a queue, to avoid timeouts.

Webhooks in automation and AI

Webhooks are the connecting link in many automations. Workflow automation platforms start whole process chains as soon as a webhook arrives, for instance when a form is filled in or an order placed. That creates reactive systems responding to events without manual intervention.

In AI solutions webhooks connect models and agents to the real business world. An incoming webhook can trigger an analysis by a Language model whose result is then distributed to downstream systems again by webhook or API. That embeds LLM workflows into existing processes in an event-driven way.

Webhooks are practical for longer-running AI tasks in particular: instead of waiting synchronously for the result of an expensive computation, the system starts the task and is notified by webhook as soon as the result is ready. That keeps interfaces responsive and decouples processing from the original request.

Building a webhook endpoint

A webhook endpoint is technically an ordinary HTTP endpoint accepting POST requests. It matters that it acknowledges the request quickly with a success status code, so the source system does not treat the delivery as failed and retry needlessly. The actual processing should be decoupled from that.

In practice a three-stage approach has proven its worth: receive, validate, queue. First the signature is checked and the payload roughly checked for plausibility. The event is then written to a queue and acknowledged immediately. Only afterwards does a background process take over the actual, possibly time-intensive handling.

For troubleshooting it helps to log incoming webhooks and store them with a unique event identifier. Deliveries can then be traced and, if something goes wrong, reprocessed deliberately without burdening the source system.

Frequently asked questions

What is a webhook?

A webhook is an automated HTTP callback with which one system notifies another of an event in real time. When the event occurs, the source system sends an HTTP request with the data to a preconfigured URL on the receiving system. No active polling is needed.

What is the difference between a webhook and an API?

With a classic API, the client actively requests data from the server. With a webhook it is the other way round: the server calls the client as soon as an event occurs. That is why a webhook is also called a reverse API. In practice the two often complement each other.

When is a webhook better than polling?

Webhooks are superior when real-time reactions matter and events occur irregularly. They avoid empty requests and reduce load and delay. Polling suits rare or non-critical queries where a permanently reachable endpoint would be too much effort.

How do you secure a webhook?

A signature check is usual: the source system signs the payload with a secret key and the receiving system verifies the signature. In addition, endpoints should use HTTPS, validate incoming data and process notifications idempotently, to catch duplicate deliveries.

What role do webhooks play in automation?

They are the connecting link in many automated processes. Workflow automation platforms start whole sequences as soon as a webhook arrives. In AI solutions, webhooks trigger model analysis and distribute the results to downstream systems, driven by events.

What to do when a webhook is not delivered?

Most source systems retry failed deliveries automatically at increasing intervals. The endpoint should acknowledge requests quickly and move the processing out asynchronously, to avoid timeouts. A log with a unique event identifier also helps reprocess missed events deliberately.

Put AI to work for your business?

We help you integrate artificial intelligence into your processes, your marketing and your website — strategically and securely.

Request a project

Stefan

Your contact

Stefan

I look forward to hearing about your project and finding the best solution together.