外观
通知地址列表
GET /webhooks
| 权限范围 | 幂等 | operationId |
|---|---|---|
webhooks:manage | 只读 | Webhooks_list |
示例
js
const res = await client.get("/webhooks");http
GET /open/v1/webhooks HTTP/1.1
Host: api.sybb.pw
Authorization: SY-HMAC-SHA256 Credential=ak_…, Timestamp=1796035200, Nonce=…, Signature=…响应 200:
json
{
"items": [
{
"webhookId": "wh_1CcCZKQvkWWEgAfxpMOQNIQ",
"url": "https://example.com/sy-webhook",
"eventTypes": [
"string"
],
"description": "说明文字",
"status": "enabled",
"consecutiveFailures": 1,
"secret": "string",
"createdAt": "2026-11-30T20:15:00+08:00"
}
]
}响应
WebhookView
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
webhookId | string | 通知地址 ID(wh_…) | |
url | string | 地址 | |
eventTypes | string[] | 订阅的事件类型;["*"] = 全部 | |
description | string | 说明 | |
status | string | enabled / disabled / auto_disabled(连续 3 天全部失败被系统停用) | |
consecutiveFailures | integer | 连续投递失败次数(成功一次清零;连续失败 3 天自动停用) | |
secret | string | 只在创建和轮换时返回 | |
createdAt | string | 时间(RFC 3339) |
错误
签名、权限、限流等通用错误见错误处理。