Webhooks
In plain English
Plain definition
Webhooks let one system notify another by sending an HTTP request after an event. A dependable workflow must authenticate requests, handle duplicates and failures, expose delivery evidence, and support bounded replay or disablement.
Technical definition
Technically, a webhook is an event-triggered HTTP callback. A producer associates one or more event types with a subscriber-provided endpoint. When a matching event occurs, the producer constructs a request containing event metadata or a payload and attempts delivery to that endpoint.
The request commonly carries a stable event identifier, event type, creation time and body, but these fields are not guaranteed across implementations. Authentication may use a shared secret, a message signature, a bearer credential, mutual TLS or another product-defined control. Transport encryption protects the connection, while request authentication helps the receiver assess who sent the message and whether protected content was altered. Product documentation remains authoritative for the actual scheme.
A successful HTTP response normally acknowledges receipt, but it does not necessarily prove that downstream processing completed. A robust receiver can acknowledge only after durable acceptance, then process the event asynchronously. This separates the producer’s delivery timeout from longer internal work.
Operational relevance
Webhooks reduce detection latency and repeated polling traffic, but they create an externally triggered operational path. The receiver must treat every request as untrusted until the configured authentication and validation checks pass. It should accept only the required route and methods, apply least privilege to downstream identities, limit request size and processing time, and avoid recording secrets or sensitive payloads unnecessarily.
Delivery can be delayed, duplicated, reordered or abandoned after a provider-specific retry window. These are operational possibilities, not universal guarantees. The receiver should therefore be idempotent where repeated processing would cause harm. It should record a safe event identifier and processing state, reject invalid requests, and send failures to bounded retry or review handling rather than retrying indefinitely.
Observable success means more than receiving one test request. Evidence should show that an authorised event reaches the intended endpoint, passes authenticity checks, is accepted once, produces the expected bounded downstream outcome, and can be traced without exposing credentials or private production data. Monitoring should distinguish rejected requests, delivery failures, duplicate suppression, processing failures and backlog growth.
Architecture relationship
A webhook connects an event producer to an HTTP receiver. The receiver often places an accepted event on a queue before a worker performs the business action. This introduces an asynchronous boundary: producer acknowledgement, durable acceptance and downstream completion are separate states.
The pattern relates to event-driven architecture, but a webhook endpoint is not itself a message broker. A broker may provide internal buffering, fan-out and consumer controls after receipt. An API also remains distinct: an API describes an interface, while a webhook describes event-triggered invocation of an endpoint. A webhook workflow may use both.
Example
Consider an isolated workflow in which a source system notifies a test receiver when a non-production record changes. Before enabling it, an operator confirms the applicable product version, permissions, documented payload and authentication method. The receiver is restricted to the expected path and uses a minimally privileged downstream identity.
- Create a synthetic test record with no private production data.
- Trigger one documented event and retain its safe event identifier.
- Confirm that transport and request authentication checks pass before acceptance.
- Confirm that the receiver durably records the event and performs exactly one bounded test action.
- Repeat the same event identifier through an approved test or replay facility, if the product supports one, and verify that duplicate processing is suppressed.
- Simulate a bounded receiver failure only in the isolated environment, then inspect documented delivery evidence without assuming a particular retry schedule.
Stop if authentication cannot be verified, the event affects an unintended target, sensitive data appears in logs, or repeated delivery causes repeated side effects. Disable the test subscription or route using the product’s documented control, retain diagnostic evidence, and reverse only the bounded test-side effect through an approved application procedure. Human review is required before any production enablement.
Misunderstanding
A common misunderstanding is that a successful webhook response proves the complete workflow succeeded. It may prove only that the receiver returned an HTTP status. Durable acceptance and downstream processing need separate evidence.
Another misunderstanding is that HTTPS alone authenticates the event. HTTPS authenticates the server to the client under the negotiated certificate model and protects data in transit; it does not, by itself, establish that an inbound application message was produced by the expected sender. The configured request-authentication mechanism must also be checked.
Finally, webhooks should not be assumed to provide exactly-once delivery or ordered events. Unless the relevant product contract explicitly states otherwise, design for duplicate, delayed or out-of-order delivery and document residual risk.
Related terms
- Callback: an operation invoked after another event or operation.
- Polling: repeatedly requesting state instead of receiving event-triggered notification.
- Event: a representation that something of interest occurred.
- Idempotency: the property that repeating an operation does not create additional unintended effects.
- Message signature: a cryptographic value used under a defined scheme to assess message authenticity and integrity.
- Replay: a subsequent delivery of an event, whether intentional or unintended.
- Dead-letter handling: bounded storage or routing for messages that cannot be processed normally.
Further reading and safe next decision
Consult the cited technology reference, then obtain the producer’s and receiver’s current primary documentation for payload structure, authentication, timeout, retry, replay and disablement controls. The supplied source establishes only a term-level technology reference; it does not substantiate one universal implementation contract.
Before production use, require evidence from an isolated test showing authenticated receipt, durable acceptance, idempotent handling, expected downstream state and usable monitoring. Confirm that operators can stop new deliveries and recover the bounded test action through documented controls. If any control or delivery contract remains unknown, keep the workflow disabled and escalate to the responsible product owners rather than inferring behaviour.