Webhook

A webhook is an event-driven mechanism that automatically sends data from one software system to another when a specified event occurs.

Instead of repeatedly asking whether something changed, the receiving system is notified when the event happens.

What Is a Webhook?

A webhook sends an HTTP request to a predefined URL when a specific event occurs.

Examples include:

  • New lead created
  • Payment completed
  • Appointment booked
  • Support request escalated
  • Conversation handed off
  • Order status changed

The receiving system can then process the event.

How a Webhook Works

A typical webhook flow is:

  1. The receiving system provides a webhook URL.
  2. The sending system stores that URL.
  3. An event occurs.
  4. The sending system sends an HTTP request.
  5. The receiving system processes the payload.
  6. The receiving system returns a success or error response.

Webhook vs. REST API

A REST API is usually request-driven.

A webhook is event-driven.

Example:

REST API: The application asks, "Has the booking changed?"

Webhook: The booking system sends, "The booking changed."

This can reduce unnecessary repeated requests.

Webhook vs. Polling

Polling means repeatedly checking a system for updates.

For example:

  • Check every minute
  • Check every five minutes
  • Check every hour

A webhook sends the update only when the event happens.

This is generally more efficient when the source system supports reliable event notifications.

Webhook Payload

The webhook payload contains information about the event.

A payload may include:

  • Event type
  • Timestamp
  • Record ID
  • Customer information
  • Status
  • Metadata

JSON is a common payload format.

Common Webhook Use Cases

CRM Updates

Send a lead or customer event to another system.

Support Escalation

Notify an external help desk when a conversation requires human support.

Booking Events

Trigger workflows when appointments are created or changed.

Payments

Notify a system when payment succeeds or fails.

Notifications

Trigger an email, message, or internal alert.

Webhooks and AI Agents

An AI workflow can use webhooks to connect conversation events with external systems.

For example:

  1. AI qualifies a lead.
  2. Workflow sends the data through a webhook.
  3. CRM creates a new record.

Or:

  1. AI cannot resolve a request.
  2. Human Handoff is triggered.
  3. A webhook sends the conversation context to an external system.

Webhook Security

Webhook endpoints should be protected.

Common practices include:

  • Signed requests
  • Secret tokens
  • HTTPS
  • Payload validation
  • IP controls where appropriate
  • Replay protection
  • Logging

The receiving system should verify that the request is legitimate.

Webhook Reliability

Webhook systems should account for:

  • Temporary failures
  • Retry behavior
  • Duplicate deliveries
  • Out-of-order events
  • Timeout handling

Receiving systems should ideally process repeated events safely.

Webhooks and Workflow Automation

Webhooks are useful building blocks for Workflow Automation.

They allow one system's event to start another workflow automatically.

Webhooks in AskHandle

AskHandle can use webhook-based Human Handoff and integration patterns to send conversation information to external systems.

This gives businesses a flexible way to connect AskHandle workflows with existing software.