冷邮件 API
查看发送容量
查看每天的发信量、每封的价格,以及为你的活动追加的容量。免费。
GET https://api.won.dev/v1/email/capacity
查看这个账户每天最多能发多少封邮件,以及每封的价格:共享邮箱池为 $0.03,开通专用套餐后为 $0.01。同时列出为你的发送活动追加、尚未用完的容量。当一个活动的发送量超出共享池的承载能力时,会为它追加邮箱,该活动需为追加的每封邮件承诺 $0.03:活动发出的邮件会逐封抵扣承诺额度,30 天后剩余部分将被收费。免费。
- 计费: 免费。
参数
此接口没有参数。
响应
错误说明见错误码。
| 字段 | 类型 | 说明(API 原文) |
|---|---|---|
data | object | How much this account can send, and at what price. |
data.type | shared | dedicated | shared while your emails leave from mailboxes other customers write from too, dedicated while you have a plan of mailboxes of your own. |
data.daily_limit | integer | The most emails this account sends in a day, across all its campaigns. |
data.sent_today | integer | Emails sent since midnight UTC. |
data.price_per_email | number | What one email sent costs now, in US dollars. |
data.dedicated | object | null | Your dedicated plan. Null when you never had one. |
data.dedicated.status | active | grace | ended | active, grace while a period could not be paid (it ends at grace_until unless the balance is topped up), or ended. |
data.dedicated.daily_volume | integer | The emails a day the plan is for. |
data.dedicated.ready_per_day | integer | What your own mailboxes can send today. New mailboxes start slowly and reach full speed in about a week. Your campaigns send from them once this is as much as the account may send on the shared pool, or as the plan is for. |
data.dedicated.price_per_period | number | What one period of 30 days costs, in US dollars. |
data.dedicated.period_start | string | When the current period started, as an ISO 8601 time in UTC. |
data.dedicated.period_end | string | When it ends, and the next one is charged, as an ISO 8601 time in UTC. |
data.dedicated.renews | boolean | Whether the next period is charged and the plan goes on. |
data.dedicated.grace_until | string | null | With grace: when the plan ends unless the period is paid. Null otherwise. |
data.commitments | object[] | Sending capacity added for your campaigns, still being used up. Each email sent uses up its part; what is left at due_at is charged. |
data.commitments[].campaign_id | string | The campaign the capacity was added for. |
data.commitments[].emails | integer | The emails committed to. |
data.commitments[].emails_sent | integer | How many of them were sent. |
data.commitments[].held | number | What is still set aside for the rest, in US dollars. |
data.commitments[].due_at | string | When what is still held is charged, as an ISO 8601 time in UTC. |
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/email/capacity" \
-H "Authorization: Bearer $WON_API_KEY"{
"data": {
"type": "shared",
"daily_limit": 500,
"sent_today": 112,
"price_per_email": 0.03,
"dedicated": null,
"commitments": [
{
"campaign_id": "cmp_7p1q8w3e5r4k2m9x",
"emails": 1500,
"emails_sent": 620,
"held": 26.4,
"due_at": "2026-12-14T08:40:00.000Z"
}
]
},
"notice": null,
"usage": {
"cost": 0,
"balance": 48.08,
"replayed": false
}
}用测试 key(won_test_...)发送这个请求,会在沙箱中运行:不发信,不收费。