OpenAI 列出Webhook端点

2026-11-12 16:14 更新

列出 Webhook 端点

get /webhook_endpoints

返回当前身份验证所对应项目的 Webhook 端点,按从新到旧的顺序排列。

查询参数

  • after: optional string or null

上一页最后一个 Webhook 端点的 ID。

  • limit: optional integer

返回的 Webhook 端点数量上限。默认为20。

minimum: 1, maximum: 100

返回值

  • WebhookEndpointList object { data, first_id, has_more, 2 more }

  • data: array of WebhookEndpoint

当前页中的 Webhook 端点。

  • id: string

Webhook 端点的唯一 ID。

  • created_at: integer

端点创建时的 Unix 时间戳。

format: unixtime

  • event_types: array of string

触发向此端点投递的事件类型。

  • name: string

端点便于阅读的名称。

  • object: "webhook_endpoint" (default: "webhook_endpoint")

对象类型,始终为 webhook_endpoint。

  • "webhook_endpoint"

  • signing_secret_hint: string or null

端点签名密钥的掩码提示。

  • url: string

接收 Webhook 投递的 HTTPS URL。

  • updated_at: optional integer

上次更改端点配置或签名密钥时的 Unix 时间戳。创建时初始化;测试以及未改变配置的更新不会推进此时间戳。

format: unixtime

  • first_id: string or null

当前页第一个端点的 ID。

  • has_more: boolean

是否还有更多 Webhook 端点可供获取。

  • last_id: string or null

当前页最后一个端点的 ID。

  • object: "list" (default: "list")

对象类型,始终为 list。

  • "list"

示例

## 从环境变量读取 API 密钥;运行前替换 Webhook 端点 ID、URL 和名称占位值。
curl https://api.openai.com/v1/webhook_endpoints \
    -H "Authorization: Bearer $OPENAI_API_KEY"

200:示例

{
  "data": [
    {
      "id": "id",
      "created_at": 0,
      "event_types": [
        "string"
      ],
      "name": "示例端点",
      "object": "webhook_endpoint",
      "signing_secret_hint": "signing_secret_hint",
      "url": "url",
      "updated_at": 0
    }
  ],
  "first_id": "first_id",
  "has_more": true,
  "last_id": "last_id",
  "object": "list"
}
以上内容是否对您有帮助:
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号