管理

更新 Webhook

需要工作区 Management Token (mt-...),可在 Dashboard > API > Management Tokens 中创建。发送 Authorization: Bearer mt-....。不支持 Inference API keys (sk-...) 和 Webhook 签名密钥 (whsec_...)。仅可访问该 token 所属的工作区。

PATCHhttps://api.tokenlab.sh/v1/management/webhooks/{webhookId}

使用工作区 Management Token(mt-...),不是推理 API 密钥(sk-...)或签名密钥(whsec_...)。在 Dashboard → API → Management Tokens 创建,并发送 Authorization: Bearer mt-...。访问范围限于该工作区。

事件、验签、重试和故障排查见 Webhook 管理 API 指南。

curl -X PATCH "https://example.com/v1/management/webhooks/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "object": "webhook_endpoint",  "url": "string",  "events": [    "task.completed"  ],  "is_active": true,  "description": "string",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "last_delivered_at": "2019-08-24T14:15:22Z",  "failure_count": 0}

授权

ManagementTokenAuth
AuthorizationBearer <token>

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

位置: header

路径参数

webhookId*string
长度1 <= length <= 128

请求体

application/json

属性1 <= properties

响应

application/json

application/json

application/json

application/json

application/json

application/json