> ## 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.

# List Webhooks

> Retrieves a list of all webhooks subscribed in your workspace. Filter by event type or campaign ID.

## Overview

Retrieves a list of all webhooks subscribed in your workspace. You can filter webhooks by event type and campaign ID to find specific subscriptions.

## Use Cases

* **Audit**: View all active webhook subscriptions in your workspace
* **Management**: Identify which webhooks are configured for specific campaigns
* **Debugging**: Verify webhook configurations and URLs

## Query Parameters

| Parameter    | Type   | Required | Description                                                                       |
| ------------ | ------ | -------- | --------------------------------------------------------------------------------- |
| `type`       | string | No       | Filter by webhook event type (e.g., `lead_tagged_interested`, `message_received`) |
| `campaignId` | string | No       | Filter by specific campaign ID                                                    |

## Available Event Types

When using the `type` filter, you can specify any of these event types:

| Event Type                      | Description                      |
| ------------------------------- | -------------------------------- |
| `lead_tagged_interested`        | Lead tagged as "Interested"      |
| `lead_meeting_booked`           | Lead tagged as "Meeting Booked"  |
| `lead_status_matched`           | Lead accepted by screening       |
| `lead_status_discarded`         | Lead discarded by screening      |
| `campaign_completed`            | Campaign finished                |
| `message_received`              | Lead sent a message              |
| `linkedin_account_disconnected` | LinkedIn account disconnected    |
| `connection_request_accepted`   | Lead accepted connection request |
| `campaign_without_leads`        | Active campaign ran out of leads |

## Examples

### List all webhooks

```bash theme={null}
curl --request GET \
  --url 'https://api.walead.ai/v1/hooks/list' \
  --header 'x-api-key: <api-key>'
```

### Filter by event type

```bash theme={null}
curl --request GET \
  --url 'https://api.walead.ai/v1/hooks/list?type=message_received' \
  --header 'x-api-key: <api-key>'
```

### Filter by campaign

```bash theme={null}
curl --request GET \
  --url 'https://api.walead.ai/v1/hooks/list?campaignId=campaign_xyz789' \
  --header 'x-api-key: <api-key>'
```

### Filter by both type and campaign

```bash theme={null}
curl --request GET \
  --url 'https://api.walead.ai/v1/hooks/list?type=lead_tagged_interested&campaignId=campaign_xyz789' \
  --header 'x-api-key: <api-key>'
```

## Response

The endpoint returns an array of webhook objects with the following structure:

```json theme={null}
[
  {
    "id": "webhook_abc123",
    "url": "https://your-domain.com/webhooks/walead",
    "type": "message_received",
    "campaignId": "campaign_xyz789",
    "createdAt": "2024-03-15T10:30:00Z",
    "status": "active"
  },
  {
    "id": "webhook_def456",
    "url": "https://your-domain.com/webhooks/leads",
    "type": "lead_tagged_interested",
    "campaignId": null,
    "createdAt": "2024-03-14T14:20:00Z",
    "status": "active"
  }
]
```

## Error Responses

### Invalid Webhook Type

```json theme={null}
{
  "statusCode": 400,
  "message": "Invalid webhook type. Valid types: lead_tagged_interested, lead_meeting_booked, lead_status_matched, lead_status_discarded, campaign_completed, message_received, linkedin_account_disconnected, connection_request_accepted, campaign_without_leads"
}
```


## OpenAPI

````yaml GET /v1/hooks/list
openapi: 3.1.0
info:
  title: WaLead API
  description: >-
    WaLead Public API for managing LinkedIn outreach campaigns, leads, and
    analytics
  version: 1.0.0
  contact:
    name: WaLead Support
    url: https://walead.ai
servers:
  - url: https://app-api.walead.ai/api
    description: Production server
security:
  - apiKeyAuth: []
paths:
  /v1/hooks/list:
    get:
      summary: List Webhooks
      description: >-
        Retrieves a list of all webhooks subscribed in your workspace. Filter by
        event type or campaign ID.
      parameters:
        - name: type
          in: query
          description: Filter by webhook event type
          required: false
          schema:
            type: string
            enum:
              - lead_tagged_interested
              - lead_meeting_booked
              - lead_status_matched
              - lead_status_discarded
              - campaign_completed
              - message_received
              - linkedin_account_disconnected
              - connection_request_accepted
              - campaign_without_leads
        - name: campaignId
          in: query
          description: Filter by campaign ID
          required: false
          schema:
            type: string
      responses:
        '200':
          description: List of webhooks retrieved successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      description: Webhook unique identifier
                    url:
                      type: string
                      description: Webhook URL endpoint
                    type:
                      type: string
                      description: Webhook event type
                    campaignId:
                      type: string
                      nullable: true
                      description: Associated campaign ID (if applicable)
                    createdAt:
                      type: string
                      format: date-time
                      description: Webhook creation timestamp
                    status:
                      type: string
                      description: Webhook status
        '400':
          description: Bad Request - Invalid webhook type
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized - Invalid API Key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      required:
        - statusCode
        - message
      properties:
        statusCode:
          type: integer
          description: HTTP status code
        message:
          type: string
          description: Error message
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication. Generate from your WaLead dashboard.

````