冷邮件 API
Webhook 推送记录
查看 Webhook 最近的推送记录,以及你的服务器的响应。免费。
GET https://api.won.dev/v1/webhooks/{id}/deliveries
查看 Webhook 最近的推送记录,按时间倒序,附带你的服务器的响应。可用于排查事件为何没有送达。免费。
- 计费: 免费。
参数
id 放在路径中,其余参数放在查询字符串里,多个值用英文逗号分隔。
| 参数 | 类型 | 必填 | 说明(API 原文) |
|---|---|---|---|
id | string | 是 | Webhook ID, such as whk_2m9x7p1q8w3e5r4k. |
limit | integer | 否 | How many to return, 1 to 100. Default: 25. |
响应
错误说明见错误码。
| 字段 | 类型 | 说明(API 原文) |
|---|---|---|
data | object[] | |
data[].event_id | string | |
data[].event_type | string | |
data[].status | pending | delivered | failed | pending is waiting for its next attempt. failed was given up after eight. |
data[].attempts | integer | |
data[].response_status | integer | null | The HTTP status your server answered with. |
data[].duration_ms | integer | null | |
data[].error | string | null | What went wrong, when no 2xx came. |
data[].next_attempt_at | string | null | |
data[].created_at | string | |
data[].delivered_at | string | null | |
notice | string | null | A plain sentence when there is something to know about this answer. Null otherwise. |
usage | object | Nothing is charged here. The balance, for reference. |
usage.cost | number | What this call cost, in US dollars. |
usage.balance | number | The balance left after this call, in US dollars. |
usage.replayed | boolean | True 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_...)发送这个请求,会在沙箱中运行:不发信,不收费。