创建 Webhook 端点
注册一个可公网访问的 HTTPS 地址。响应中的 whsec_ 签名密钥只返回一次,请立即安全保存。
认证
API Key:X-API-Key: <API Key> 或 Authorization: Bearer <API Key>。
示例中的凭证为占位值,请替换后在服务器端运行。
代码示例
curl -X POST 'https://shixux.com/api/v1/webhook-endpoints' \ -H 'X-API-Key: yb_xxx_yyy' \ -H 'Content-Type: application/json' \ -d '{"name":"production","url":"https://example.com/webhooks/shixu"}'{ "id": "example", "name": "example", "url": "https://example.com/resource", "enabled": true, "secret_version": 1, "created_at": "2026-10-06T10:00:00Z", "updated_at": "2026-10-06T10:00:00Z", "signing_secret": "example"}application/json- body
name*string长度
1 <= length <= 120url*string格式
uri长度
1 <= length <= 2083请求成功
application/json- response
id*stringMatch
^whe_[a-f0-9]{32}$name*string长度
length <= 120url*string格式
uri长度
length <= 2083enabled*booleansecret_version*integer范围
1 <= valuelast_delivery_at?|nulllast_success_at?|nulllast_failure_at?|nullcreated_at*string格式
date-timeupdated_at*string格式
date-timesigning_secret*stringMatch
^whsec_