Glossary termIntegration technique

Webhook

Also known as: Web callback, HTTP push API, Reverse API

HTTP callback in which one system automatically sends data to another the moment a specific event occurs, instead of waiting to be asked.

A webhook is a mechanism that lets one application notify another about an event as it happens. The receiving system registers a URL with the sending system. When the relevant event occurs, such as a payment completing, a form being submitted or code being pushed to a repository, the sender makes an HTTP request to that URL, usually a POST whose JSON body describes the event. The receiver then acts on the data, for example by updating a database record or posting a message to a chat channel.

Webhooks invert the usual pattern of an API call. Instead of a client repeatedly polling a server to ask whether anything has changed, the server pushes a message only when there is something to report, which saves requests and reduces delay. The term is generally credited to Jeff Lindsay, who proposed it in 2007 by analogy with hooks, the programming term for points where custom code can be attached. Code hosting platforms, payment processors and chat services adopted the pattern widely, and automation tools build entire workflows from webhook triggers.

Because a webhook endpoint is a publicly reachable URL, security matters. Senders commonly sign each request with a shared secret so that receivers can verify it is genuine and unaltered, and receivers should accept deliveries only over HTTPS and reject unsigned or stale messages. Delivery is not guaranteed: networks fail and receivers go offline, so well-designed systems retry failed deliveries and make handlers idempotent, able to process the same event twice without harm. Webhooks are a basic building block of workflow automation.

Key points

  • A webhook delivers an HTTP request to a registered URL whenever a specified event happens in another system.
  • Pushing events as they occur avoids the wasted requests and delays of repeatedly polling an API.
  • Receivers should verify request signatures, because webhook endpoints are publicly reachable.
  • Handlers should be idempotent, since senders often retry deliveries and the same event may arrive more than once.

From the source

Webhooks are automated messages sent from apps when something happens. [...] Webhooks are usually used to connect apps and systems, allowing them to share real-time data.

Source: Zapier (opens in a new tab)

Related entries

Glossary term

API

Programming

Defined set of rules and interfaces through which one piece of software can request services or data from another without knowing its internals.

Glossary term

REST API

ProgrammingAI

Web interface that follows the REST architectural style, exposing resources at URLs that clients manipulate with stateless HTTP requests.

Glossary term

HTTP

ProgrammingCybersecurity

Stateless request-response protocol that web browsers, servers and other clients use to request and transfer resources such as web pages and data.

Glossary term

Idempotence

ProgrammingDevOps

Property of an operation that produces the same result whether it is applied once or many times, important for safe retries and automation.

Glossary term

Use of software to carry out sequences of tasks automatically, triggered by events or schedules, with little or no manual intervention.

Technology

n8n

AIDevOpsProgramming

Source-available, self-hostable workflow automation platform that links apps, APIs and AI models by chaining nodes on a visual canvas.

Glossary term

WebSocket

Programming

Communication protocol that provides a persistent, two-way channel between a web browser and a server over a single TCP connection.

Glossary term

Continuous Integration

DevOpsProgramming

Development practice in which programmers merge changes into a shared repository frequently, with each change verified by an automated build and tests.

Referenced by

Other entries that discuss or point to Webhook.