跳到正文
Won.dev
冷邮件 API

Webhook 推送记录

查看 Webhook 最近的推送记录,以及你的服务器的响应。免费。

GET https://api.won.dev/v1/webhooks/{id}/deliveries

查看 Webhook 最近的推送记录,按时间倒序,附带你的服务器的响应。可用于排查事件为何没有送达。免费。

  • 计费: 免费。

参数

id 放在路径中,其余参数放在查询字符串里,多个值用英文逗号分隔。

参数类型必填说明(API 原文)
idstring是Webhook ID, such as whk_2m9x7p1q8w3e5r4k.
limitinteger否How many to return, 1 to 100. Default: 25.

响应

错误说明见错误码。

字段类型说明(API 原文)
dataobject[]
data[].event_idstring
data[].event_typestring
data[].statuspending | delivered | failedpending is waiting for its next attempt. failed was given up after eight.
data[].attemptsinteger
data[].response_statusinteger | nullThe HTTP status your server answered with.
data[].duration_msinteger | null
data[].errorstring | nullWhat went wrong, when no 2xx came.
data[].next_attempt_atstring | null
data[].created_atstring
data[].delivered_atstring | null
noticestring | nullA plain sentence when there is something to know about this answer. Null otherwise.
usageobjectNothing is charged here. The balance, for reference.
usage.costnumberWhat this call cost, in US dollars.
usage.balancenumberThe balance left after this call, in US dollars.
usage.replayedbooleanTrue when this is a repeat of a request from the last 24 hours. Repeats are free.

示例

curl "https://api.won.dev/v1/webhooks/whk_2m9x7p1q8w3e5r4k/deliveries?limit=1" \
  -H "Authorization: Bearer $WON_API_KEY"
{
  "data": [
    {
      "event_id": "evt_5r4k2m9x7p1q8w3e",
      "event_type": "reply.received",
      "status": "delivered",
      "attempts": 1,
      "response_status": 200,
      "duration_ms": 184,
      "error": null,
      "next_attempt_at": null,
      "created_at": "2026-11-20T13:44:10.000Z",
      "delivered_at": "2026-11-20T13:44:41.000Z"
    }
  ],
  "notice": null,
  "usage": {
    "cost": 0,
    "balance": 48.08,
    "replayed": false
  }
}

用测试 key(won_test_...)发送这个请求,会在沙箱中运行:不发信,不收费。

本页内容