Open API
邮箱
使用 API 密钥认证创建邮箱地址
概述
/api/v1/emails/create 接口允许用户使用 API 密钥认证以编程方式创建邮箱地址。
体验平台
您可以在 邮箱 API 体验平台 中尝试 API 接口。
认证方式
使用 API 密钥有两种方式:
使用 API 密钥认证创建邮箱地址
/api/v1/emails/create 接口允许用户使用 API 密钥认证以编程方式创建邮箱地址。
您可以在 邮箱 API 体验平台 中尝试 API 接口。
使用 API 密钥有两种方式:
授权请求头(推荐):
Authorization: Bearer YOUR_API_KEY查询参数:
?key=YOUR_API_KEY频率限制会根据您的订阅等级自动配置:
POST /api/v1/emails/create{
"email": "myemail@ig.do",
"tag": "个人"
}| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
email | string | 是 | 完整的邮箱地址(前缀 4-64 字符,格式有效) |
tag | string | 否 | 用于分类的标签(最多 50 字符) |
对域名的访问权限基于您的订阅等级:
ig.do):所有用户可用kfc.sh、uv.do):需要专业订阅或终身计划如果您尝试在没有适当订阅的情况下使用专业域名,将收到 403 错误。
{
"success": true,
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"email": "myemail@ig.do",
"tag": "个人",
"like": false,
"pin": false,
"createdAt": "2025-12-07T12:00:00.000Z"
}
}{
"success": false,
"error": "Missing API key. Provide it via Authorization header (Bearer token) or ?key= query parameter"
}{
"success": false,
"error": "Invalid or expired API key: [error details]"
}{
"success": false,
"error": "Invalid request data",
"details": [
{
"path": ["email"],
"message": "Invalid email format"
}
]
}{
"success": false,
"error": "Email prefix length must be between 4 and 64 characters"
}{
"success": false,
"error": "The provided email prefix is reserved. Please choose another one."
}{
"success": false,
"error": "You don't have permission to use the domain \"kfc.sh\". Premium domains require an active Pro subscription or Lifetime plan."
}{
"success": false,
"error": "An email address with this address already exists"
}curl -X POST https://your-domain.com/api/v1/emails/create \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "myemail@ig.do",
"tag": "个人"
}'const response = await fetch('https://your-domain.com/api/v1/emails/create', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
email:
import requests
url = 'https://your-domain.com/api/v1/emails/create'
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
}
data =
.env 文件或安全保险库中admin、noreply、postmaster)不能用作邮箱前缀