What is a webhook?

Definition

A webhook lets a service notify another system about an event, commonly by sending an HTTP request to a configured destination. The receiving system can then start a workflow without repeatedly checking the source for changes.

Receivers need to validate incoming notifications and handle repeated, late or out-of-order events. A notification can announce a change without carrying all authoritative current data, so additional verification may be needed before consequential work begins.

ELI5

A webhook is like arranging for a shop to call you when an order is ready instead of repeatedly asking whether it is finished.

For example, an order service could notify an accounting system when an invoice is paid. The accounting system checks the notification and updates the appropriate workflow.

How is a webhook different from polling?

Polling repeatedly asks for updates. A webhook delivers a notification when the sending service observes a configured event.

Should a webhook notification be trusted automatically?

No. The receiver needs to verify its source and meaning, and account for duplicate delivery or stale information.

  1. David Ondrej beside the blue and white headline BUILD REPEATABLE AGENT LOOPS against black.
Definition card for webhook: What is a webhook?

A webhook sends an event notification from one service to a registered endpoint when a specified event occurs.