YOUXIANG Mail

API 文档

使用 REST API 接入 YOUXIANG Mail

认证

在请求头中携带 X-API-Key。

X-API-Key: yx_your_api_key_here
前往生成 API Key

端点

GET/api/emails
POST/api/emails
GET/api/emails/{id}/messages
GET/api/messages/{id}
DELETE/api/emails/{id}

cURL 示例

curl -X POST 'https://your-domain.com/api/emails' \
  -H 'X-API-Key: yx_xxx' \
  -H 'Content-Type: application/json' \
  -d '{"name":"alice","domain":"example.com","expiryTime":86400000}'

错误码

  • 401 · 未认证 / API Key 无效
  • 403 · 无权访问该资源
  • 404 · 资源不存在
  • 429 · 请求过于频繁