What Is a Webhook?

A webhook is an automated mechanism that allows one system to send real-time data to another system when a specific event occurs. It is often referred to as a "reverse API" or "HTTP push notification".

How Webhooks Work

  1. 1. You provide a callback URL

    You provide a destination URL on your receiving server where events should be delivered.

  2. 2. An event occurs

    An event happens on the source platform (such as a subscription renewal, form submission, or repository update).

  3. 3. HTTP POST request is sent

    The source system immediately executes an HTTP POST request carrying event data serialized as JSON or XML.

  4. 4. Receiver acknowledges receipt

    Your receiver confirms receipt with an HTTP 2xx status code and initiates background processing.

Webhooks vs. Traditional Polling

In traditional API polling, your application makes continuous, periodic requests to an API asking "has anything changed?". This consumes bandwidth and computing power when there are no updates.

Webhooks reverse this relationship: the server pushes updates instantly when something happens. This saves bandwidth and reduces latency to near zero.

Security Best Practices

Frequently Asked Questions

What HTTP method do webhooks usually use?
Most providers use POST requests with a JSON body, although PUT or GET may occasionally be employed depending on the provider.
What happens if my server is temporarily offline?
Most platforms implement exponential backoff retry schedules for failed delivery attempts. Check the documentation of the specific service for retry policies.