Definition

What is a webhook?

Last updated

Definition

A webhook is an HTTP callback that one service makes to another when an event occurs — used to push notifications between systems instead of polling for changes.

Webhooks are the primitive behind most real-time integrations: a payment processor calls your endpoint when a charge succeeds, a CRM calls your endpoint when a deal stage changes, an email provider calls your endpoint when a reply lands. Production webhook endpoints validate signatures (HMAC), handle retries idempotently, and respond quickly (under 5 seconds). They're how AI agents react to real-world events without polling.

Production webhook patterns

  • HMAC signature verification — every webhook should be signed; never trust the source IP or User-Agent
  • Idempotency keys — providers retry on 5xx; your handler must deduplicate
  • Async processing — return 200 quickly, queue the work; don't do slow processing inline
  • Retry-aware — log every receipt with the provider's event ID for debugging

AI Empire's Voice AI Agent uses HMAC-verified webhooks for trigger calls; the Sales Agent uses Gmail push notifications via Pub/Sub for inbound replies.

Related terms

Related modules