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

# List Webhooks

> List all active webhook subscriptions

The `secret` field is excluded from list responses — it's only returned once, on create.

<Note>
  This endpoint returns a flat array, not a paginated response.
</Note>

<RequestExample>
  ```bash curl theme={null}
  curl -X GET 'https://api.anyformat.ai/v2/webhooks/' \
    -H 'Authorization: Bearer YOUR_API_KEY'
  ```

  ```python Python (requests) theme={null}
  import requests

  url = "https://api.anyformat.ai/v2/webhooks/"
  headers = {
      "Authorization": "Bearer YOUR_API_KEY"
  }

  response = requests.get(url, headers=headers)
  webhooks = response.json()
  for webhook in webhooks:
      print(f"{webhook['id']}: {webhook['url']} ({webhook['events']})")
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.anyformat.ai/v2/webhooks/', {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY'
    }
  });

  const data = await response.json();
  console.log(data);
  ```

  ```typescript TypeScript theme={null}
  interface WebhookListItem {
    id: string;
    url: string;
    events: string[];
    is_active: boolean;
    created_at: string;
  }

  const response = await fetch('https://api.anyformat.ai/v2/webhooks/', {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY'
    }
  });

  if (!response.ok) {
    throw new Error(`API error: ${response.status}`);
  }

  const webhooks: WebhookListItem[] = await response.json();
  console.log(webhooks);
  ```
</RequestExample>

<ResponseExample>
  ```json Response (200 OK) theme={null}
  [
    {
      "id": "wh_1234567890",
      "url": "https://your-server.com/webhooks/anyformat",
      "events": ["extraction.completed", "extraction.failed"],
      "is_active": true,
      "created_at": "2024-03-24T12:00:00.000Z"
    }
  ]
  ```
</ResponseExample>
