Skip to main content
Webhooks

停用 Webhook Endpoint

暂停向指定 Endpoint 投递新事件,但保留其配置。

Webhook 当前为 Beta 功能,接口、字段和行为可能在后续版本中调整。
POST /api/v1/forward/webhook/endpoints/{endpoint_id}/disable Endpoint 已停用时重复调用仍返回当前状态。 停用前已开始的投递仍可能到达,接收端应继续使用 Webhook-ID 做幂等处理。

请求头

Header是否必填说明
AuthorizationBearer <PAT 或管理员 SAT>

路径参数

参数类型是否必填说明
endpoint_idstringWebhook Endpoint ID。

示例请求

curl -s -X POST 'https://api.qoder.com.cn/api/v1/forward/webhook/endpoints/e149c233-1234-4abc-8def-1234567890ab/disable' \
  -H "Authorization: Bearer $QODER_PAT"

示例响应

HTTP 200 OK 返回停用后的完整 Endpoint 对象,其中:
{
  "id": "e149c233-1234-4abc-8def-1234567890ab",
  "url": "https://example.com/webhooks/qoder",
  "events": ["forward.schedule_run.succeeded"],
  "metadata": {},
  "active": false,
  "last_success_at": null,
  "last_failure_at": null,
  "consecutive_fail": 0,
  "created_at": "2026-09-01T08:00:00Z",
  "updated_at": "2026-09-01T10:00:00Z"
}
响应字段见获取 Webhook Endpoint。停用不会删除 Endpoint;需要恢复时调用启用接口。

错误

HTTPType触发条件
401authentication_error认证信息缺失、无效或已过期。
403permission_error当前令牌不能管理 Webhook。
404not_found_errorEndpoint 不存在或当前账号不可见。
500/502/503api_error服务暂时不可用。

相关