§ API REFERENCE

撤销 Webhook订阅

DELETE/webhook-endpoints/{subscription_id}scope: webhook:manage

幂等撤销并软删除当前 APP 的订阅。

鉴权:Authorization: Bearer <access_token>。
§ 1

请求信息

DELETE https://api.lingxiguangnian.com/api/open/v1/webhook-endpoints/{subscription_id}

请求头

参数类型必填说明
AuthorizationstringBearer <access_token>。由 POST /token 换取,有效期 2 小时;api_secret 不得直连业务端点(→ 401)。

路径参数

参数类型必填说明
subscription_iduuid订阅ID。
§ 2

调用示例

curl -X DELETE "https://api.lingxiguangnian.com/api/open/v1/webhook-endpoints/11111111-1111-4111-8111-111111111111" -H "Authorization: Bearer oat_xxxxxxxxxxxxxxxx"
§ 3

返回结果

返回字段

参数类型必填说明
iduuid已撤销订阅ID。
{ "success": true, "data": { "id": "11111111-1111-4111-8111-111111111111" } }
§ 4

端点错误码

通用鉴权、scope 与限流错误见「使用概述」;下表为本端点专属错误。

HTTPerror_code触发条件
404open_api.webhook_not_found订阅不存在或不属于当前 APP/机构。

契约真源:apps/m-master/src/app/api/open/v1/webhook-endpoints/[subscriptionId]/route.ts