冷邮件 API
登记发件方
登记以哪家公司的名义发信。登记后即可发信。免费。
POST https://api.won.dev/v1/email/senders
登记邮件以谁的名义发出。你无需自备邮箱或域名:我们用自己预热好的邮箱发信,每个邮箱以自己的名字署名;每封邮件末尾都会附上你的公司名称、通讯地址和退订链接,这是法律要求,无法去掉。为几家公司发信,就登记几个发件方:代运营公司(agency)或服务多家公司的 agent,需要为每个客户分别登记。为自己的客户代发邮件的平台,还要把 tenant_id 设为该客户的 ID:每个租户(tenant)的收件人、退订、每日上限和发信信誉都与其他租户隔离,一个客户的问题不会殃及其他客户。邮箱是共享的,但同一时间一个邮箱只会代表一个发件方联系某家公司,回复也只会归到被回复的那个发件方。新发件方登记后即可发信。如需给欧盟、英国或加拿大的人发信,请在 regions 中声明你的合法依据;未声明时,这些地区的地址会被排除。免费。
- 计费: 免费。
参数
参数放在 JSON 请求体里。POST 请求还支持 Idempotency-Key 请求头,见重复请求。
| 参数 | 类型 | 必填 | 说明(API 原文) |
|---|---|---|---|
company_name | string | 是 | The legal or trading name of the company the emails are sent for. |
address | string | 是 | The company's postal address: street, city, postcode, country. Every email carries it. |
website | string | 是 | The company's website, such as https://example.com. |
purpose | string | 是 | What you offer and whom you will write to, in a sentence or two. It is kept with the sender. |
regions | object[] | 否 | Regions with stricter rules that you declare a lawful basis for. The declaration is recorded with the time and the key that made it. |
regions[].region | eu | uk | ca | 是 | eu, uk or ca. |
regions[].basis | string | 是 | Why you may write to people there, such as: legitimate interest, B2B contacts at companies that import our product category. |
tenant_id | string | 否 | Your own customer this sender writes for, when you send for customers of yours, such as cus_4821. Their campaigns are kept apart from your other tenants' and from your own. It cannot be changed later. Without it, the sender is your own. |
响应
错误说明见错误码。
| 字段 | 类型 | 说明(API 原文) |
|---|---|---|
data | object | |
data.id | string | Sender ID, such as snd_4k2m9x7p1q8w3e5r. |
data.company_name | string | The company the emails are sent for. Every email names it. |
data.address | string | The company's postal address. Every email carries it. |
data.website | string | The company's website. |
data.purpose | string | What the company sends and to whom, as it was described to us. |
data.tenant_id | string | null | The customer of yours the sender writes for, as you named it when you registered the sender. Null: the account itself. |
data.status | active | rejected | suspended | active: it can send, from the moment it is registered. rejected or suspended when we stopped it, with the reason in review_note. |
data.review_note | string | null | Why we stopped the sender, when we did. |
data.regions | object[] | Regions the sender declared a lawful basis for: eu, uk, ca. |
data.regions[].region | eu | uk | ca | |
data.regions[].basis | string | |
data.regions[].declared_at | string | |
data.test | boolean | Made with a test key: approved at once, never sends. |
data.created_at | string | When it was created, 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/senders \
-H "Authorization: Bearer $WON_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"company_name": "Northwind Seating Ltd",
"address": "18 Harbour Road, Leeds LS1 4AP, United Kingdom",
"website": "https://northwind-seating.example",
"purpose": "We make office chairs and write to furniture importers and distributors about our new catalogue."
}'{
"data": {
"id": "snd_4k2m9x7p1q8w3e5r",
"company_name": "Northwind Seating Ltd",
"address": "18 Harbour Road, Leeds LS1 4AP, United Kingdom",
"website": "https://northwind-seating.example",
"purpose": "We make office chairs and write to furniture importers and distributors about our new catalogue.",
"status": "active",
"tenant_id": null,
"review_note": null,
"regions": [],
"test": false,
"created_at": "2026-11-17T09:12:44.000Z"
},
"notice": null,
"usage": {
"cost": 0,
"balance": 48.08,
"replayed": false
}
}用测试 key(won_test_...)发送这个请求,会在沙箱中运行:不发信,不收费。