> ## Documentation Index
> Fetch the complete documentation index at: https://docs.walead.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhooks Overview

> Real-time notifications for events in your WaLead workspace

## What are Webhooks?

Webhooks allow you to receive real-time notifications when specific events occur in your WaLead workspace. Instead of polling the API repeatedly, webhooks push data to your application automatically when events happen.

## How Webhooks Work

1. **Subscribe** to a webhook by providing a URL endpoint and event type
2. **Receive** POST requests at your URL when the event occurs
3. **List** your active webhooks to manage and audit subscriptions
4. **Unsubscribe** when you no longer need notifications

## Available Webhook Types

WaLead supports the following webhook event types:

### Lead Events

<CardGroup cols={2}>
  <Card title="lead_tagged_interested" icon="tag">
    Triggered when a lead is tagged as "Interested"
  </Card>

  <Card title="lead_meeting_booked" icon="calendar-check">
    Triggered when a lead is tagged as "Meeting Booked"
  </Card>

  <Card title="lead_status_matched" icon="circle-check">
    Triggered when a lead is accepted by screening
  </Card>

  <Card title="lead_status_discarded" icon="circle-xmark">
    Triggered when a lead is discarded by screening
  </Card>

  <Card title="message_received" icon="message">
    Triggered when a lead sends a message
  </Card>

  <Card title="connection_request_accepted" icon="user-plus">
    Triggered when a lead accepts your connection request
  </Card>
</CardGroup>

### Campaign Events

<CardGroup cols={2}>
  <Card title="campaign_completed" icon="flag-checkered">
    Triggered when a campaign completes
  </Card>

  <Card title="campaign_without_leads" icon="users-slash">
    Triggered when an active campaign runs out of leads
  </Card>
</CardGroup>

### Account Events

<Card title="linkedin_account_disconnected" icon="link-slash">
  Triggered when a LinkedIn account is disconnected
</Card>

## Webhook Payload

Each webhook POST request includes a JSON payload with event data. The structure varies by event type but generally includes:

* Lead information (firstName, lastName, email, phone, companyName, linkedinUrl)
* Campaign details (campaignId, campaignName)
* Event-specific data (tags, screening decisions, messages, etc.)

## Managing Webhooks

You can manage your webhook subscriptions using these endpoints:

* **List Webhooks**: View all active webhooks with optional filters by type or campaign
* **Subscribe**: Create a new webhook subscription for a specific event type
* **Unsubscribe**: Remove an existing webhook subscription
* **Get Sample Data**: Retrieve sample payloads to test your integration

## Authentication

Webhooks use the same `x-api-key` authentication as other API endpoints. Include your API key in the header when subscribing or unsubscribing from webhooks.
