管理
轮换 Webhook 签名密钥
需要工作区 Management Token (mt-...),可在 Dashboard > API > Management Tokens 中创建。发送 Authorization: Bearer mt-....。不支持 Inference API keys (sk-...) 和 Webhook 签名密钥 (whsec_...)。仅可访问该 token 所属的工作区。完整的 whsec_ 签名密钥仅在创建或轮换时返回。请妥善存储;GET/list 操作不会返回该密钥。轮换对新的投递立即生效;已在传输中的投递仍可使用之前的密钥。
POSThttps://api.tokenlab.sh/v1/management/webhooks/{webhookId}/rotate-secret
使用工作区管理令牌 mt-…,不是模型调用 Key sk-…,也不是签名密钥 whsec_…。在 Dashboard → API → Management Tokens 创建,以 Authorization: Bearer mt-… 发送。只能操作该工作区。
接入、事件、验签与失败处理见 Webhook 管理 API 文档。
curl -X POST "https://example.com/v1/management/webhooks/string/rotate-secret"{ "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, "secret": "string"}授权
ManagementTokenAuth AuthorizationBearer <token>
管理令牌身份验证。在 Dashboard > API > Management Tokens 中创建或管理管理令牌。
位置: header
路径参数
webhookId*string
长度
1 <= length <= 128响应
application/json
application/json
application/json
application/json
application/json
application/json