What Is Webhook?
Also known as: HTTP callback, reverse API
Definition
A webhook is an HTTP callback in which a source system automatically sends an HTTP request to a subscriber-provided URL when a defined event occurs, pushing notification to the consumer instead of requiring the consumer to poll for changes.
Webhook Explained
Webhooks invert the normal API relationship. With a conventional API the consumer asks repeatedly whether anything has changed; with a webhook the producer tells the consumer the moment something does. The consumer registers a publicly reachable endpoint and subscribes to event types. When an order ships, an invoice posts, or a work order closes, the producer sends an HTTP POST containing an event identifier, type, timestamp, and a payload describing what happened.
The efficiency argument is straightforward. Polling an ERP every minute for changed orders generates 1,440 requests a day per object, nearly all of which return nothing, while still introducing up to a minute of latency. A webhook produces exactly as many requests as there are events and delivers them in seconds. The cost is architectural: the consumer must operate a reachable, authenticated, highly available endpoint, because a producer with nowhere to deliver an event will retry for a while and then give up.
Security must be designed in, because a webhook endpoint is by definition exposed. The standard control is a signature: the producer computes an HMAC over the raw request body using a shared secret and sends it in a header, and the consumer recomputes and compares it in constant time before trusting anything. A timestamp in the signed payload with a short acceptance window prevents replay of captured requests. Endpoints should never trust payload contents purely because they arrived at the expected URL.
Delivery semantics are at-least-once, not exactly-once, and ordering is not guaranteed. Networks fail after the receiver has already committed, so producers retry with exponential backoff and consumers see duplicates. Consumers must therefore be idempotent, typically by recording the event identifier and ignoring repeats, and must tolerate an update event arriving before its create event. The practical pattern is to acknowledge fast with a 2xx after durably queueing the event, then process asynchronously, so slow downstream work never causes the producer to consider delivery failed.
In ERP landscapes webhooks are how event-driven integration usually starts. Salesforce and ServiceMax publish platform events and outbound messages, integration platforms expose webhook triggers, and on-premises ERPs are commonly extended with database triggers or business rules that call an outbound endpoint. Where the ERP is behind a firewall, the pattern reverses again: an agent inside the network polls or subscribes and forwards outward, since inbound connections to the ERP host are usually prohibited.
Why It Matters
- Event push eliminates polling load on ERP systems while cutting integration latency from minutes to seconds.
- Unverified webhook endpoints are directly exploitable, so HMAC signature checking and replay windows are mandatory, not optional hardening.
- At-least-once delivery makes consumer idempotency a correctness requirement, otherwise duplicate events create duplicate transactions.
- Firewall constraints in on-premises ERP environments often force an outbound agent pattern rather than direct inbound webhooks.
In Practice
Acknowledge before you process. A supplier's endpoint received shipment events and performed a full ERP posting inline, taking 40 seconds under load. The producer timed out at 10 seconds, marked delivery failed, and retried - so the same shipment posted four times. Returning 202 immediately after writing the event to a durable queue, then processing from the queue with idempotency on the event id, eliminated both the duplicates and the retries.
Frequently Asked Questions
What is the difference between a webhook and an API?
Direction and initiative. With a conventional API the consumer initiates a request whenever it wants data. With a webhook the producer initiates the request when an event occurs, delivering data to a URL the consumer registered in advance. Webhooks are often described as reverse APIs, and most platforms offer both so consumers can react to events and then query for detail.
How do you secure a webhook endpoint?
Require HTTPS, verify an HMAC signature computed over the raw body with a shared secret using constant-time comparison, enforce a short timestamp window to block replay, and treat the payload as untrusted input regardless. Additional controls include IP allowlisting where the producer publishes stable ranges, per-subscription secrets, and rate limiting to prevent an abusive sender from overwhelming downstream processing.
Related Terms
REST API
A REST API is a web interface that exposes application data as addressable resources over HTTP, using standard verbs such as GET, POST, PUT, PATCH, and DELETE, stateless requests, and conventional status codes, typically exchanging JSON.
API (Application Programming Interface)
An API (Application Programming Interface) is a defined contract that lets one software system request data or trigger functions in another, specifying the available operations, the structure of requests and responses, and the rules for authentication and error handling.
iPaaS
iPaaS (Integration Platform as a Service) is a cloud-hosted platform that provides prebuilt connectors, data mapping, orchestration, and monitoring so organizations can build and operate integrations between applications without running their own integration infrastructure.
Go Deeper
ITAR Compliance Checklist for Manufacturers
A 32-point checklist covering DDTC registration, technical data controls, foreign person access, IT security, and recordkeeping for ITAR-regulated manufacturers.
CMMC-Compliant AI Deployment: What Level 2 Contractors Must Know
CMMC-compliant AI deployment explained: how Level 2 defense contractors can run AI on CUI without expanding assessment scope. Controls, enclaves, and costs.
AI Governance for Export-Controlled Data (ITAR/EAR)
AI governance for export-controlled data: policies, access controls, and audit trails that keep ITAR and EAR data out of public LLMs and off foreign servers.
Working with Webhook in a live environment? Our engineers do this every day - and our AI agents automate most of it.