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

# 获取 Webhook 列表

> 获取你账户上注册的所有 Webhook 端点，可按状态筛选以查找启用、禁用或已删除的 Webhook。

使用此接口列出你账户上注册的 Webhook 端点。你可以按状态筛选，仅查看启用、禁用或已删除的 Webhook。响应最多包含 100 个 Webhook，按最近更新时间倒序排列。每条结果都包含 `webhookId`、事件类型、回调 URL 以及用于签名验证的公钥。

> [!NOTE]
>
> 所有请求都必须包含 `X-BH-TOKEN` 请求头，其值为通过 `GET /v2/token/generate` 获取的业务令牌。

## 接口地址

`GET https://api.velafi.com/v2/webhooks`

## 查询参数

**status** `integer`

可选。按 Webhook 状态筛选。如果省略，将返回所有状态的 Webhook，包括已删除的：

* `10` — 启用
* `20` — 禁用
* `30` — 已删除

## 响应字段

**code** `number`

HTTP 风格的响应码。`200` 表示成功。

**msg** `string`

可读的状态信息，例如 `SUCCESS`。

**data** `array`

**data 条目字段**

**webhookId** `string`

该 Webhook 的唯一标识符。

**eventType** `string`

该 Webhook 接收的事件类型（例如 `ORDER_WEBHOOK`）。

**url** `string`

已注册的回调 URL。

**status** `number`

Webhook 状态：`10` = 启用，`20` = 禁用，`30` = 已删除。

**publicKey** `string`

Base64 编码的 RSA 公钥，用于验证 Webhook 签名。

## 示例

```bash cURL theme={null}
curl -G https://api.velafi.com/v2/webhooks \
  -H "X-BH-TOKEN: YOUR_TOKEN" \
  --data-urlencode "status=10"
```

```json Response theme={null}
{
  "code": 200,
  "msg": "SUCCESS",
  "data": [
    {
      "webhookId": "ebab8a9663704e7cbbebe672c7c67912",
      "eventType": "ORDER_WEBHOOK",
      "url": "https://your-app.com/webhooks/velafi",
      "status": 10,
      "publicKey": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAp/6GRTIrl+kQb9u27cGz..."
    }
  ]
}
```

> [!TIP]
>
> 如果需要轮换或替换 Webhook URL，请在此处获取 `webhookId`，然后使用新 URL 调用[更新 Webhook](https://docs.velafi.com/cn/api-reference/webhooks/update-a-webhook.md) 接口。


## Related topics

- [获取商户列表](https://docs.velafi.com/cn/api-reference/merchant/get-a-list-of-merchants.md)
- [获取国家列表](https://docs.velafi.com/cn/api-reference/basic-configuration/get-list-of-countries.md)
- [获取订单列表](https://docs.velafi.com/cn/api-reference/order/retrieve-a-list-of-orders.md)
- [获取法币列表](https://docs.velafi.com/cn/api-reference/basic-configuration/get-list-of-fiat-currencies.md)
- [获取收款人列表](https://docs.velafi.com/cn/api-reference/beneficiary/get-beneficiary.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.