Skip to main content
Webhooks

启用 Webhook Endpoint

启用指定 Endpoint,使其继续接收事件。

Webhook 当前为 Beta 功能,接口、字段和行为可能在后续版本中调整。
POST /api/v1/forward/webhook/endpoints/{endpoint_id}/enable Endpoint 已启用时重复调用仍返回当前状态。

请求头

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/enable' \
  -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": true,
  "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

错误

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

相关