REST API · 邮箱
邮箱验证 API
通过简洁的 REST API 购买一次性邮箱地址以接收 OTP 验证码。与短信端点采用相同的 JSON 约定和相同的 API 密钥,位于 /v1/email-activations 命名空间下。
基础 URL
https://smsbulk.net/api/v1/email-activations一个 API 密钥同时适用于短信和邮箱。如果你已集成短信 API,几分钟即可用上邮箱。
身份验证
每个请求都需携带 API 密钥。支持两种可互换的方式:
# 1. Header (recommended)
curl https://smsbulk.net/api/v1/email-activations \
-H "x-api-key: YOUR_KEY"
# 2. Bearer token
curl https://smsbulk.net/api/v1/email-activations \
-H "Authorization: Bearer YOUR_KEY"请通过请求头 (x-api-key) 或 Bearer 令牌发送密钥。出于安全考虑,不建议将其作为 URL 查询参数传递,因为查询字符串通常会被记录到服务器和代理日志中。
你的短信 API 密钥与此处使用的密钥相同,没有单独的邮箱密钥。
端点
/api/v1/email-activations 下的六个路由。价格面向用户;绝不返回批发成本。
GET/api/v1/email-activations/domains?site=telegram.com
列出目标站点可用的邮箱服务商域名,含面向用户的价格和库存。
请求
curl "https://smsbulk.net/api/v1/email-activations/domains?site=telegram.com" \
-H "x-api-key: YOUR_KEY"响应
[
{ "name": "gmx.com", "price": 0.04, "count": 12, "currency": "USD" }
]POST/api/v1/email-activations
为站点/域名组合预订一个邮箱地址。立即从钱包扣款,并返回状态为 WAITING 的激活记录。
请求
curl -X POST https://smsbulk.net/api/v1/email-activations \
-H "x-api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "site": "telegram.com", "domain": "gmx.com" }'响应
{
"id": "cmox8h7pmicm3mkczzwhdz0yd",
"site": "telegram.com",
"domain": "gmx.com",
"emailAddress": null,
"status": "WAITING",
"otpValue": null,
"userCost": "0.04",
"currency": "USD",
"expiresAt": "2026-06-03T14:05:00Z",
"receivedAt": null,
"createdAt": "2026-06-03T13:45:00Z"
}GET/api/v1/email-activations?limit=50
返回你最近的邮箱激活记录,最新的在前。默认 50,最多 100,无游标分页。
请求
curl "https://smsbulk.net/api/v1/email-activations?limit=50" \
-H "x-api-key: YOUR_KEY"响应
[
{
"id": "cmox8h7pmicm3mkczzwhdz0yd",
"site": "telegram.com",
"domain": "gmx.com",
"emailAddress": "[email protected]",
"status": "RECEIVED",
"otpValue": "595348",
"userCost": "0.04",
"currency": "USD",
"expiresAt": "2026-06-03T14:05:00Z",
"receivedAt": "2026-06-03T13:47:12Z",
"createdAt": "2026-06-03T13:45:00Z"
}
]GET/api/v1/email-activations/:id
获取单条激活记录。收到后包含解析出的 OTP 和原始 HTML 邮件正文。
请求
curl https://smsbulk.net/api/v1/email-activations/cmox8h7pmicm3mkczzwhdz0yd \
-H "x-api-key: YOUR_KEY"响应
{
"id": "cmox8h7pmicm3mkczzwhdz0yd",
"site": "telegram.com",
"domain": "gmx.com",
"emailAddress": "[email protected]",
"status": "RECEIVED",
"otpValue": "595348",
"htmlMessage": "<html>Your code is 595348</html>",
"userCost": "0.04",
"currency": "USD",
"expiresAt": "2026-06-03T14:05:00Z",
"receivedAt": "2026-06-03T13:47:12Z",
"createdAt": "2026-06-03T13:45:00Z"
}POST/api/v1/email-activations/:id/reorder
为新的 OTP 重新开启同一地址。会再次从钱包扣款(相当于短信的重新发送)。
请求
curl -X POST https://smsbulk.net/api/v1/email-activations/cmox8h7pmicm3mkczzwhdz0yd/reorder \
-H "x-api-key: YOUR_KEY"响应
{
"id": "cmox8h7pmicm3mkczzwhdz0yd",
"site": "telegram.com",
"domain": "gmx.com",
"emailAddress": null,
"status": "WAITING",
"otpValue": null,
"userCost": "0.04",
"currency": "USD",
"expiresAt": "2026-06-03T14:20:00Z",
"receivedAt": null,
"createdAt": "2026-06-03T13:45:00Z"
}DELETE/api/v1/email-activations/:id
取消激活。若未收到 OTP,则退款至你的钱包。
请求
curl -X DELETE https://smsbulk.net/api/v1/email-activations/cmox8h7pmicm3mkczzwhdz0yd \
-H "x-api-key: YOUR_KEY"响应
{
"id": "cmox8h7pmicm3mkczzwhdz0yd",
"site": "telegram.com",
"domain": "gmx.com",
"emailAddress": null,
"status": "REFUNDED",
"otpValue": null,
"userCost": "0.04",
"currency": "USD",
"expiresAt": "2026-06-03T14:05:00Z",
"receivedAt": null,
"createdAt": "2026-06-03T13:45:00Z"
}说明与限制
- 每日配额由短信和邮箱共享:每个 API 密钥每个 UTC 日 10,000 次请求。
- 列表端点最多返回 100 行(默认 50),且按设计不提供游标分页。
- 忠诚度折扣会自动应用到扣款价格。userCost 反映你实际支付的金额。
