# List webhook endpoints

> For the complete machine-readable documentation index, see [llms.txt](https://apidocs.chargebee.com/llms.txt).


[Eventually Consistent](/docs/api/read-consistency)

Retrieves all webhook endpoints configured on your Chargebee site. The response includes each endpoint's ID, name, and target URL. Use this API to view, audit, or manage the list of webhook endpoints currently active or configured in your site.

## Sample Request

#### cURL

```bash
curl  https://{site}.chargebee.com/api/v2/webhook_endpoints \
     -u {site_api_key}:
```

#### .NET

```dotnet
using ChargeBee.Api;
using ChargeBee.Models;

ApiConfig.Configure("{site}","{site_api_key}");
ListResult result = WebhookEndpoint.List().Request();

foreach (var listItem in result.List){
  WebhookEndpoint webhookEndpoint = listItem.WebhookEndpoint;
}
```

#### Go

```go
package main
import (
    "fmt"
    "github.com/chargebee/chargebee-go/v3"
    webhookendpointAction "github.com/chargebee/chargebee-go/v3/actions/webhookendpoint"
    "github.com/chargebee/chargebee-go/v3/models/webhookendpoint"
)
func main() {
    chargebee.Configure("{site_api_key}","{site}");
    res,err := webhookendpointAction.List(&webhookendpoint.ListRequestParams{}).ListRequest()
    if err != nil {
        fmt.Println(err)
    } else {
        for idx := 0; idx < len(res.List); idx++ {
            WebhookEndpoint := res.List[idx].WebhookEndpoint
        }
    }
}
```

#### Go

```go
package main

import (
  "fmt"
  "github.com/chargebee/chargebee-go/v4"
)

func main() {
  config := &chargebee.ClientConfig{
    SiteName: "{site}",
    ApiKey: "{site_api_key}",
  }    
  client := chargebee.NewClient(config)
  req := &chargebee.WebhookEndpointListRequest{}
  res, err := client.WebhookEndpoint.List(req)
      if err != nil {
        fmt.Println(err)
    } else {
        for idx := 0; idx < len(res.List); idx++ {
            WebhookEndpoint := res.List[idx].WebhookEndpoint
        }
    }
}
```

#### Java

```java
import com.chargebee.*;
import com.chargebee.ListResult;
import com.chargebee.models.*;
import com.chargebee.models.enums.*;
import java.io.IOException;
import java.util.List;

public class Sample {

    public static void main(String args[]) throws IOException, Exception {
        Environment.configure("{site}", "{site_api_key}");
        ListResult result = WebhookEndpoint.list().request();

        for (ListResult.Entry entry : result) {
            WebhookEndpoint webhookEndpoint = entry.webhookEndpoint();
        }
    }
}
```

#### Java

```java
import com.chargebee.v4.client.ChargebeeClient;
import com.chargebee.v4.models.webhookEndpoint.WebhookEndpoint;
import com.chargebee.v4.models.webhookEndpoint.params.WebhookEndpointListParams;
import com.chargebee.v4.models.webhookEndpoint.responses.WebhookEndpointListResponse;
import java.util.List;

public class WebhookEndpointList {

    public static void main(String[] args) {
        ChargebeeClient client = ChargebeeClient.builder()
            .apiKey("{site_api_key}")
            .siteName("{site}")
            .build();

        WebhookEndpointListResponse response = client.webhookEndpoints().list();
    }
}
```

#### Node.js

```node
import Chargebee from "chargebee";

const chargebee = new Chargebee({
    site: "{site}",
    apiKey: "{site_api_key}",
});

try {
    const result = await chargebee.webhookEndpoint.list();
    result.list.forEach((entry) => {
        console.log(entry);
        const webhookEndpoint = entry.webhook_endpoint;
    });
} catch (err) {
    console.log(err);
}
```

#### PHP

```php
<?php

require __DIR__ . '/vendor/autoload.php';

use Chargebee\ChargebeeClient;

$chargebee = new ChargebeeClient(options: [
    "site" => "{site}",
    "apiKey" => "{site_api_key}",
]);
$result = $chargebee->webhookEndpoint()->all();
foreach($result->list as $entry) {
    $webhookEndpoint = $entry->webhook_endpoint;
}
```

#### Python

```python
from chargebee import Chargebee, Filters

cb_client = Chargebee(api_key="{site_api_key}", site="{site}")
entries = cb_client.WebhookEndpoint.list()
for entry in entries.list:
    webhook_endpoint = entry.webhook_endpoint
```

#### Ruby

```ruby
require 'chargebee'

ChargeBee.configure(:site => "{site}",
  :api_key => "{site_api_key}")

list = ChargeBee::WebhookEndpoint.list()

list.each do |entry|
  webhook_endpoint = entry.webhook_endpoint
end
```

## Sample Response

```json
{
  "list": [
    {
      "webhook_endpoint": {
        "id": "whv2_198PKVUX26UX9IvR",
        "name": "Notify Subscription",
        "api_version": "v2",
        "enabled_events": [
          "subscription_created",
          {..}
        ],
        "url": "https://{host}.com",
        "primary_url": true,
        "send_card_resource": false,
        "disabled": false
      }
    },
    {..}
  ]
}
```

## URL Format

**GET** https://[site].chargebee.com/api/v2/webhook_endpoints

## Input Parameters

- `limit` (optional, integer, default=10, min=1, max=100)
  The number of resources to be returned.

- `offset` (optional, string, max chars=1000)
  Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set `offset` to the value of `next_offset` obtained in the previous iteration of the API call.

## Returns

- `next_offset` (optional, string, max chars=1000)
  This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter `offset`.

- `webhook_endpoint` (Webhook endpoint object)
  Resource object representing webhook\_endpoint
