跳到正文
Won.dev
冷邮件 API

申请专用容量

开通每天 200 到 5,000 封的专用邮箱,每封 $0.01,每个域名每 30 天 $25。

POST https://api.won.dev/v1/email/capacity

为你的账户配置一批专用邮箱,每天可发 200 到 5,000 封:其他人的邮件不会从这些邮箱发出,每封邮件收费 $0.01,而不是 $0.03。套餐按发信域名售卖,每个域名每天 50 封,每 30 天 $25,开通时立即扣费,之后每个周期开始时再扣。新邮箱起步较慢,约 6 天后达到全速(见 ready_per_day):在它们能承接你的账户在共享池上的发送量之前,活动会继续在共享池上按原有每日上限发送,之后只从你的专用邮箱发出,上限为套餐的发信量。不带 confirm: true 时只报价,不做任何改动。如需扩容,直接申请更大的发信量即可:新周期按新规模开始,当前周期未用完的部分退回余额。套餐运行期间不能缩容。账户需要先在共享池上发信满 7 天且至少 200 封,并且退信少、无投诉。测试 key 只会拿到报价。

  • 计费: email_dedicated_domain $25:一个专用发信域名使用 30 天,带 confirm: true 时扣费,之后每个周期开始时再扣。不带时只报价,免费。

参数

参数放在 JSON 请求体里。POST 请求还支持 Idempotency-Key 请求头,见重复请求。

参数类型必填说明(API 原文)
daily_volumeinteger是The emails a day you want to send from mailboxes of your own, 200 to 5000. Rounded up to whole domains of 50.
confirmboolean否True starts or grows the plan and charges its first period. False, the default, only quotes it. Default: false.
max_costnumber否Spending cap for this call in US dollars. If the call could cost more, it fails with budget_exceeded before anything is charged.

响应

错误说明见错误码。

字段类型说明(API 原文)
dataobjectThe plan and its price.
data.confirmedbooleanTrue when the plan was started or grown. False on a quote: nothing changed.
data.daily_volumeintegerThe emails a day the plan is for.
data.domainsintegerSending domains of your own, at 50 emails a day each.
data.price_per_periodnumberWhat one period of 30 days costs, in US dollars.
data.creditnumberWhat the unused part of your current period gives back to your balance when the plan grows, in US dollars. 0 otherwise.
data.capacityobjectYour capacity after this call.
data.capacity.typeshared | dedicatedshared while your emails leave from mailboxes other customers write from too, dedicated while you have a plan of mailboxes of your own.
data.capacity.daily_limitintegerThe most emails this account sends in a day, across all its campaigns.
data.capacity.sent_todayintegerEmails sent since midnight UTC.
data.capacity.price_per_emailnumberWhat one email sent costs now, in US dollars.
data.capacity.dedicatedobject | nullYour dedicated plan. Null when you never had one.
data.capacity.dedicated.statusactive | grace | endedactive, grace while a period could not be paid (it ends at grace_until unless the balance is topped up), or ended.
data.capacity.dedicated.daily_volumeintegerThe emails a day the plan is for.
data.capacity.dedicated.ready_per_dayintegerWhat 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.capacity.dedicated.price_per_periodnumberWhat one period of 30 days costs, in US dollars.
data.capacity.dedicated.period_startstringWhen the current period started, as an ISO 8601 time in UTC.
data.capacity.dedicated.period_endstringWhen it ends, and the next one is charged, as an ISO 8601 time in UTC.
data.capacity.dedicated.renewsbooleanWhether the next period is charged and the plan goes on.
data.capacity.dedicated.grace_untilstring | nullWith grace: when the plan ends unless the period is paid. Null otherwise.
data.capacity.commitmentsobject[]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.capacity.commitments[].campaign_idstringThe campaign the capacity was added for.
data.capacity.commitments[].emailsintegerThe emails committed to.
data.capacity.commitments[].emails_sentintegerHow many of them were sent.
data.capacity.commitments[].heldnumberWhat is still set aside for the rest, in US dollars.
data.capacity.commitments[].due_atstringWhen what is still held is charged, as an ISO 8601 time in UTC.
noticestring | nullA plain sentence when there is something to know about this answer. Null otherwise.
usageobjectWhat this call was charged, and the balance left.
usage.costnumberWhat this call cost, in US dollars.
usage.breakdownobject[]Every billing unit that came back, charged or not. Empty when nothing did.
usage.breakdown[].unitemail_sent | email_sent_dedicated | email_capacity | email_dedicated_domainWhat is counted.
usage.breakdown[].recordsintegerHow many were returned and charged.
usage.breakdown[].already_paidintegerHow many more were returned for free, because this organization paid for them in the last 30 days.
usage.breakdown[].costnumberWhat they 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/email/capacity \
  -H "Authorization: Bearer $WON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "daily_volume": 400,
  "confirm": true
}'
{
  "data": {
    "confirmed": true,
    "daily_volume": 400,
    "domains": 8,
    "price_per_period": 200,
    "credit": 0,
    "capacity": {
      "type": "dedicated",
      "daily_limit": 500,
      "sent_today": 112,
      "price_per_email": 0.01,
      "dedicated": {
        "status": "active",
        "daily_volume": 400,
        "ready_per_day": 0,
        "price_per_period": 200,
        "period_start": "2026-11-21T10:02:00.000Z",
        "period_end": "2026-12-21T10:02:00.000Z",
        "renews": true,
        "grace_until": 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": 200,
    "breakdown": [
      {
        "unit": "email_dedicated_domain",
        "records": 8,
        "already_paid": 0,
        "cost": 200
      }
    ],
    "balance": 248.08,
    "replayed": false
  }
}

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

本页内容