Skip to main content
POST
创建 Webhook 端点
使用工作区管理令牌 mt-…,不是模型调用 Key sk-…,也不是签名密钥 whsec_…。在 Dashboard → API → Management Tokens 创建,以 Authorization: Bearer mt-… 发送。只能操作该工作区。 接入、事件、验签与失败处理见 Webhook 管理 API 文档。

授权

Authorization
string
header
必填

管理令牌身份验证。在 Dashboard > API > Management Tokens 中创建或管理管理令牌。

请求体

application/json
url
string<uri>
必填

公共 HTTPS 接收方 URL。凭据、查询字符串、片段、私有或保留网络目标以及重定向将被拒绝。

events
enum<string>[]
必填

支持的事件订阅;重复项将被移除。

Required array length: 1 - 10 elements
可用选项:
task.completed,
task.failed,
task.timeout
description
string
Maximum string length: 200

响应

创建 Webhook 端点结果

id
string
必填
object
enum<string>
必填
可用选项:
webhook_endpoint
url
string
必填
events
enum<string>[]
必填
可用选项:
task.completed,
task.failed,
task.timeout
is_active
boolean
必填
description
string | null
必填
created_at
string<date-time>
必填
updated_at
string<date-time>
必填
last_delivered_at
string<date-time> | null
必填
failure_count
integer
必填
secret
string
必填