What is a webhook?
Short answer
A webhook is an automated HTTP request a service sends to a URL you provide whenever a specific event occurs, so you receive data the moment it changes instead of repeatedly asking for it.
Webhook vs polling
With a normal API you pull data by sending requests. A webhook flips that: the provider pushes data to you. You register a URL, and when an event happens the provider sends an HTTP POST to it with the event details. That is why webhooks are also called HTTP callbacks.
How a webhook flows
- Payment received -> your billing system is notified
- New commit pushed -> your CI pipeline starts
- Form submitted -> a message is posted to chat
- Email delivered or bounced -> your app updates status
200, doing heavy work asynchronously.