通用能力接口参考Webhook创建 Webhook 端点

创建 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
  1. body
name*string
长度1 <= length <= 120
url*string
格式uri
长度1 <= length <= 2083

响应体

请求成功

application/json
  1. response
id*string
Match^whe_[a-f0-9]{32}$
name*string
长度length <= 120
url*string
格式uri
长度length <= 2083
enabled*boolean
secret_version*integer
范围1 <= value
last_delivery_at?|null
last_success_at?|null
last_failure_at?|null
created_at*string
格式date-time
updated_at*string
格式date-time
signing_secret*string
Match^whsec_

本页目录