冷邮件 API
移除禁发条目
移除你手动添加的条目或曾经退信的地址。免费。
DELETE https://api.won.dev/v1/email/suppressions/{id}
从名单中移除你手动添加的条目或曾经退信的地址,用于纠正误加的情况。退订或投诉过的人会一直留在名单上:这是他们的选择,而不是你的。曾经退信的地址在退信后 90 天内仍会被排除,之后才会重新尝试。移除条目不会重新启动因它而结束的序列。免费。
- 计费: 免费。
参数
id 放在路径中。DELETE 请求还支持 Idempotency-Key 请求头,见重复请求。
| 参数 | 类型 | 必填 | 说明(API 原文) |
|---|---|---|---|
id | string | 是 | Suppression ID, such as sup_8w3e5r4k2m9x7p1q. |
响应
错误说明见错误码。
| 字段 | 类型 | 说明(API 原文) |
|---|---|---|
data | object | The entry that was removed. |
data.id | string | The entry that was removed. |
data.deleted | boolean | Always true: the entry is gone. |
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 -X DELETE "https://api.won.dev/v1/email/suppressions/sup_8w3e5r4k2m9x7p1q" \
-H "Authorization: Bearer $WON_API_KEY"{
"data": {
"id": "sup_8w3e5r4k2m9x7p1q",
"deleted": true
},
"notice": null,
"usage": {
"cost": 0,
"balance": 48.08,
"replayed": false
}
}用测试 key(won_test_...)发送这个请求,会在沙箱中运行:不发信,不收费。