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

# Get All Webhooks

> Retrieve a list of all your webhooks.

## Endpoint

```bash theme={null}
GET https://pay.sandbox.yabetoopay.com/v1/account/{accountId}/webhooks   # Sandbox
GET https://pay.api.yabetoopay.com/v1/account/{accountId}/webhooks       # Production
```

## Authentication

Use your secret key in the `Authorization` header:

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

## Path Parameters

| Parameter   | Type     | Description     |
| ----------- | -------- | --------------- |
| `accountId` | `string` | Your account ID |

## Query Parameters

| Parameter | Type      | Description                                      |
| --------- | --------- | ------------------------------------------------ |
| `limit`   | `integer` | Number of items per page (default: 10, max: 100) |
| `page`    | `integer` | Page number (starts at 1)                        |
| `status`  | `string`  | Filter by status                                 |

## Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://pay.sandbox.yabetoopay.com/v1/account/YOUR_ACCOUNT_ID/webhooks?limit=10&page=1" \
    -H "Authorization: Bearer YOUR_SECRET_KEY"
  ```

  ```javascript JavaScript theme={null}
  import Yabetoo from "@yabetoo/sdk-js";

  const yabetoo = new Yabetoo("YOUR_SECRET_KEY");

  const webhooks = await yabetoo.webhooks.list({
    limit: 10,
    page: 1,
  });
  ```

  ```python Python theme={null}
  from yabetoo import Yabetoo

  yabetoo = Yabetoo("YOUR_SECRET_KEY")

  webhooks = yabetoo.webhooks.list(limit=10, page=1)
  ```

  ```php PHP theme={null}
  <?php
  require 'vendor/autoload.php';

  use Yabetoo\Yabetoo;

  $yabetoo = new Yabetoo("YOUR_SECRET_KEY");

  $webhooks = $yabetoo->webhooks->all([
      "limit" => 10,
      "page" => 1,
  ]);
  ```

  ```java Java theme={null}
  import com.yabetoo.Yabetoo;
  import com.yabetoo.YabetooConfig;
  import com.yabetoo.model.Webhook;
  import com.yabetoo.model.WebhookCollection;
  import com.yabetoo.request.WebhookListRequest;

  YabetooConfig config = new YabetooConfig()
      .setApiKey("YOUR_SECRET_KEY");

  Yabetoo yabetoo = new Yabetoo(config);

  WebhookListRequest request = WebhookListRequest.builder()
      .setLimit(10L)
      .setPage(1L)
      .build();

  WebhookCollection webhooks = yabetoo.webhooks().list(request);
  ```
</CodeGroup>

## Response

### 200 OK

```json theme={null}
{
  "data": [
    {
      "id": "whk_123456789",
      "object": "webhook",
      "url": "https://example.com/webhooks",
      "description": "Production webhook",
      "status": "active",
      "enabled_events": [
        "intent.completed",
        "disbursement.completed"
      ],
      "metadata": {
        "environment": "production"
      },
      "created_at": "2023-05-12T10:12:32Z",
      "last_error": null,
      "stats": {
        "successful_deliveries": 150,
        "failed_deliveries": 2,
        "average_response_time": 245
      }
    }
  ],
  "meta": {
    "total": 25,
    "page": 1,
    "limit": 10,
    "pages": 3
  }
}
```

### Available Status Filters

| Status     | Description                      |
| ---------- | -------------------------------- |
| `active`   | Active webhooks                  |
| `disabled` | Manually disabled webhooks       |
| `failed`   | Webhooks disabled after failures |

### 401 Unauthorized

```json theme={null}
{
  "message": "Unauthorized"
}
```
