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

# List webhook subscriptions

> List all webhook subscriptions for the shop.

List all webhook subscriptions for the shop, newest first. The signing secret is never included in this response.

## Query parameters

| Parameter      | Type    | Description                                  |
| -------------- | ------- | -------------------------------------------- |
| `page[number]` | integer | Page number (default: `1`)                   |
| `page[size]`   | integer | Results per page (default: `20`, max: `100`) |

## Errors

| Status | Scenario                                                              |
| ------ | --------------------------------------------------------------------- |
| `401`  | Missing or invalid API key                                            |
| `429`  | [Rate limit](/api-reference/rate-limits) exceeded (6 requests/second) |

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api.mageloyalty.com/v1/webhook-subscriptions?page[number]=1&page[size]=20' \
    --header 'Authorization: <api-key>'
  ```

  ```javascript Node theme={null}
  const response = await fetch(
    "https://api.mageloyalty.com/v1/webhook-subscriptions?page[number]=1&page[size]=20",
    {
      method: "GET",
      headers: {
        Authorization: "<api-key>",
      },
    }
  );

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

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

  response = requests.get(
      "https://api.mageloyalty.com/v1/webhook-subscriptions",
      headers={"Authorization": "<api-key>"},
      params={"page[number]": 1, "page[size]": 20},
  )

  data = response.json()
  ```

  ```php PHP theme={null}
  <?php
  $ch = curl_init("https://api.mageloyalty.com/v1/webhook-subscriptions?page[number]=1&page[size]=20");
  curl_setopt_array($ch, [
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_HTTPHEADER => [
          "Authorization: <api-key>",
      ],
  ]);
  $data = json_decode(curl_exec($ch), true);
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "data": [
      {
        "type": "webhook_subscription",
        "id": "whsub_abc123",
        "attributes": {
          "url": "https://example.com/webhooks/mage",
          "events": ["points.earned", "customer.tier_upgrade"],
          "is_active": true,
          "description": "Production points + tier sync",
          "created_at": "2024-01-01T00:00:00.000Z",
          "updated_at": "2024-01-01T00:00:00.000Z"
        }
      }
    ],
    "meta": {
      "total": 1,
      "page": 1,
      "per_page": 20,
      "total_pages": 1
    }
  }
  ```

  ```json 401 Unauthorized theme={null}
  {
    "errors": [
      {
        "status": "401",
        "title": "Unauthorized",
        "detail": "Invalid or revoked API key"
      }
    ]
  }
  ```
</ResponseExample>
