ToAPIsToAPIs
Webhook

查询 Webhook 事件

查询 Webhook 事件

GET
/api/v1/webhook/events/{event_id}

国内用户请注意: 中国大陆用户请使用 https://api.toapis.cn 作为接口地址 (Base URL). 文档示例中的 https://api.toapis.com 请替换为 https://api.toapis.cn.

使用说明

查询单条投递事件的最新状态和重试情况, 返回事件状态, 投递次数, 最后 HTTP 状态, 脱敏后的 reason 和 RFC 3339 时间. 不返回事件 payload, 回调地址, 接收端原始响应, 执行投递的 worker 信息, 或每次重试的完整明细. 属于其他账号或不存在的事件统一返回 404.

鉴权

Authorizationstring请求头必填

使用系统访问令牌, 格式为 Bearer YOUR_SYSTEM_ACCESS_TOKEN, 只能访问当前账号自己的数据. 不接受模型 Key, 无需 X-User-Id, 也没有管理端或团队旁路.

请求参数

event_idstring路径必填

事件 ID.

event_id 不存在或属于其他账户统一返回 404; 触发限流返回 429.

请求示例

请求示例

curl --request GET \
  --url 'https://api.toapis.com/api/v1/webhook/events/evt_example' \
  --header 'Authorization: Bearer YOUR_SYSTEM_ACCESS_TOKEN'

响应示例

响应示例

{
  "code": 0,
  "message": "",
  "data": {
    "event_id": "evt_example",
    "api_key_id": 123,
    "task_id": "example-task",
    "type": "generation.completed",
    "status": "delivered",
    "attempts": 1,
    "reason": "delivered",
    "last_http_status": 200,
    "created_at": "2026-11-13T00:00:00Z",
    "next_attempt_at": null,
    "delivered_at": "2026-11-13T00:00:01Z",
    "expires_at": "2026-11-14T12:00:00Z"
  }
}

首次接入顺序与签名验签说明见查询 Webhook 配置.