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

# List Webhook Endpoints

> List all webhook endpoints configured for your business

# List Webhook Endpoints

Returns a list of all webhook endpoints configured for your business.

## Request

<ParamField header="Authorization" type="string" required>
  Bearer token with your API key
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Whether the request was successful
</ResponseField>

<ResponseField name="data" type="array">
  Array of webhook endpoint objects

  <Expandable title="endpoint object">
    <ResponseField name="id" type="string">
      Unique endpoint identifier
    </ResponseField>

    <ResponseField name="url" type="string">
      Webhook URL
    </ResponseField>

    <ResponseField name="events" type="array">
      Subscribed event types
    </ResponseField>

    <ResponseField name="isActive" type="boolean">
      Whether the endpoint is active
    </ResponseField>

    <ResponseField name="description" type="string">
      Endpoint description
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      ISO 8601 timestamp
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl https://api.swiftpay.cx/api/webhooks \
    -H "Authorization: Bearer mp_live_your_api_key"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.swiftpay.cx/api/webhooks", {
     headers: {
        Authorization: "Bearer mp_live_your_api_key",
     },
  });

  const webhooks = await response.json();

  webhooks.data.forEach((endpoint) => {
     console.log(`${endpoint.id}: ${endpoint.url}`);
     console.log(`  Events: ${endpoint.events.join(", ")}`);
     console.log(`  Active: ${endpoint.isActive}`);
  });
  ```

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

  response = requests.get(
      'https://api.swiftpay.cx/api/webhooks',
      headers={'Authorization': 'Bearer mp_live_your_api_key'}
  )

  webhooks = response.json()

  for endpoint in webhooks['data']:
      print(f"{endpoint['id']}: {endpoint['url']}")
      print(f"  Events: {', '.join(endpoint['events'])}")
      print(f"  Active: {endpoint['isActive']}")
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "data": [
      {
        "id": "wh_abc123",
        "url": "https://yoursite.com/webhooks/swiftpay",
        "events": [
          "checkout.completed",
          "checkout.failed",
          "refund.completed"
        ],
        "isActive": true,
        "description": "Production webhook handler",
        "createdAt": "2024-01-15T10:30:00Z"
      },
      {
        "id": "wh_def456",
        "url": "https://staging.yoursite.com/webhooks",
        "events": ["*"],
        "isActive": false,
        "description": "Staging environment",
        "createdAt": "2024-01-10T08:00:00Z"
      }
    ]
  }
  ```
</ResponseExample>

<Note>
  The webhook signing secret is never returned in list responses. If you've
  lost your secret, create a new endpoint.
</Note>
