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 設定.