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

# List Webhook Endpoints

> Retrieve all webhook configurations for the authenticated partner

# List Webhook Endpoints

GET [https://api.baanx.com/v1/webhooks](https://api.baanx.com/v1/webhooks)
Retrieves all webhook configurations for the authenticated partner.

## Overview

Returns an array of webhook endpoints with their current status, subscribed event types, and masked API keys. Use this to audit your webhook configurations and check which endpoints are active.

## Authentication

This endpoint requires authentication via Bearer token:

```bash theme={null} theme={null}
Authorization: Bearer YOUR_ACCESS_TOKEN
```

## Request

### Headers

<ParamField header="Authorization" type="string" required>
  Bearer token for authentication
</ParamField>

<ParamField header="Content-Type" type="string">
  Must be `application/json`
</ParamField>

### Request Example

<CodeGroup>
  ```bash cURL theme={null} theme={null}
  curl -X GET https://api.baanx.com/v1/webhooks \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
  ```

  ```javascript JavaScript theme={null} theme={null}
  const response = await fetch('https://api.baanx.com/v1/webhooks', {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
    }
  });

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

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

  url = "https://api.baanx.com/v1/webhooks"
  headers = {
      "Authorization": "Bearer YOUR_ACCESS_TOKEN"
  }

  response = requests.get(url, headers=headers)
  print(response.json())
  ```

  ```typescript TypeScript theme={null} theme={null}
  const listWebhooks = async (): Promise<WebhookConfig[]> => {
    const response = await fetch('https://api.baanx.com/v1/webhooks', {
      method: 'GET',
      headers: {
        'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
      }
    });

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

    return await response.json();
  };
  ```
</CodeGroup>

## Response

### 200 Success

Returns an array of webhook configuration objects. API keys are masked for security.

<ResponseField name="id" type="string (UUID)">
  Unique identifier for the webhook configuration
</ResponseField>

<ResponseField name="tenant" type="string">
  Partner tenant identifier
</ResponseField>

<ResponseField name="name" type="string">
  Human-readable name for the webhook
</ResponseField>

<ResponseField name="url" type="string">
  HTTPS endpoint URL for webhook delivery
</ResponseField>

<ResponseField name="apiKey" type="string">
  Masked API key used for signature verification (e.g., `whk_****...****5678`)
</ResponseField>

<ResponseField name="eventTypes" type="array">
  List of event types this webhook subscribes to
</ResponseField>

<ResponseField name="isActive" type="boolean">
  Whether the webhook is currently active and receiving events
</ResponseField>

<ResponseField name="metadata" type="object">
  Custom metadata attached to the webhook
</ResponseField>

<ResponseField name="createdAt" type="string (ISO 8601)">
  Timestamp when the webhook was created
</ResponseField>

<ResponseField name="updatedAt" type="string (ISO 8601)">
  Timestamp when the webhook was last updated
</ResponseField>

<ResponseExample>
  ```json 200 - Success theme={null} theme={null}
  [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "tenant": "partner-name",
      "name": "KYC Status Webhook",
      "url": "https://api.partner.com/webhooks/kyc",
      "apiKey": "whk_****...****5678",
      "eventTypes": ["kyc.status.changed", "card.activated"],
      "isActive": true,
      "metadata": { "environment": "production" },
      "createdAt": "2025-12-29T10:00:00.000Z",
      "updatedAt": "2025-12-29T12:00:00.000Z"
    }
  ]
  ```
</ResponseExample>

## Error Responses

<ResponseExample>
  ```json 401 - Unauthorized theme={null} theme={null}
  {
    "message": "Not authenticated"
  }
  ```

  ```json 403 - Forbidden theme={null} theme={null}
  {
    "message": "Not authorized"
  }
  ```

  ```json 503 - Service Unavailable theme={null} theme={null}
  {
    "message": "Notification service is not configured for this environment"
  }
  ```
</ResponseExample>

## Related Endpoints

* `POST /v1/webhooks` - Create a new webhook endpoint
* `GET /v1/webhooks/{id}` - Get a specific webhook by ID
* `PUT /v1/webhooks/{id}` - Update a webhook configuration
* `DELETE /v1/webhooks/{id}` - Delete a webhook endpoint
