邮件发送 - 模板发送日本語 API接口文档,稳定可靠的邮件发送API,支持SMTP直连和模板化发送。适用于跨境电商订单通知、营销邮件、用户验证等场景。データダッシュボードによる精密運用。支持参数说明、调用示例、在线测试。免费试用。

请求格式

POST /api/v1/email

请求头信息:

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Accept: application/json

请求参数

参数名 类型 必填 说明
tostring是收件人邮箱地址
subjectstring是邮件主题
bodystring是邮件正文(模板发送模式)
template_idstring否邮件模板ID

调用示例 - cURL

curl -X POST "https://cross.cybermagi.space/api/v1/email" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to": "customer@example.com", "subject": "订单确认通知", "body": "您的订单已确认,感谢您的购买!"}'

Python 调用示例

# Pythonコード例
import requests

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://cross.cybermagi.space"

headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json"
}

data = {
    "target": "template"
}

response = requests.post(
    f"{BASE_URL}/api/v1/email",
    json=data,
    headers=headers
)

result = response.json()
print(result)

返回示例

{
  "success": true,
  "data": {
    "message_id": "msg_template_1679091c",
    "status": "sent",
    "to": "customer@example.com",
    "sent_at": "2026-07-17T08:00:00Z"
  },
  "request_id": "req_email_template_ja_6"
}
🚀 在线测试

点击返回主页,获取API密钥并在线测试