返回首页

邮件推送-邮件发送

/api/v1/email 0.2 积分/次 运行中

【邮件推送 邮件发送】邮件发送接口提供电子邮件发送服务,帮助用户快速、精准地实现事务邮件、通知邮件和批量邮件的发送,支持邮件内容模板定制。

请求示例
request
curl -X POST https://api.zhuimengapi.com/api/v1/email \
  -H "X-API-Key: RPA-xxxxxxxx"
  -d "templateId=your_templateId \
  -d "toAddress=your_toAddress \
  -d "subject=your_subject \
  -d "values=your_values \
  -d "attachments=your_attachments \
  -d "fromAlias=your_fromAlias \
  -d "replyAddress=your_replyAddress"
import requests

url = "https://api.zhuimengapi.com/api/v1/email"
headers = {"X-API-Key": "RPA-xxxxxxxx"}
data = {
  "templateId": "your_templateId",
  "toAddress": "your_toAddress",
  "subject": "your_subject",
  "values": "your_values",
  "attachments": "your_attachments",
  "fromAlias": "your_fromAlias",
  "replyAddress": "your_replyAddress"
}

res = requests.post(url, data=data, headers=headers)
print(res.json())
const axios = require('axios');

axios.post("https://api.zhuimengapi.com/api/v1/email", {
    templateId: "your_templateId",
    toAddress: "your_toAddress",
    subject: "your_subject",
    values: "your_values",
    attachments: "your_attachments",
    fromAlias: "your_fromAlias",
    replyAddress: "your_replyAddress"
}, {
  headers: { "X-API-Key": "RPA-xxxxxxxx" }
}).then(res => console.log(res.data));
响应示例
response.json
{
    "code": 0,
    "msg": "返回码对应描述",
    "taskNo": "本次请求号",
    "data": {
        "taskId": "任务id"
    }
}
接口信息
请求地址 https://api.zhuimengapi.com/api/v1/email
请求方式 POST
Content-Type application/x-www-form-urlencoded
鉴权方式 X-API-Key: RPA-xxxxxxxx
templateId string 必填
邮件模板ID,请联系供应商提供,可用:JMNJ3Z67PVQO
toAddress string 必填
目标地址。示例:testxxx@example.com
subject string 必填
邮件主题,长度不大于256个字符
values string 必填
邮件发送的变量值,即替换模板中@1@的变量,多个变量按顺序以竖线分隔,单个变量不超过30字符。JMNJ3Z67PVQO模板三个参数siteName、code、expireMinutes,例如:追梦网络
attachments string
附件。json格式数组,单次请求最多可支持100个附件,所有附件的总大小不得超过8M。示例:[{"attachmentName":"附件图片.png","attachmentUrl":"https://xxx.com/file/xxx.png"},{"attachmentName":"附件文件.pdf","attachmentUrl":"https://xxx.com/file/xxx.pdf"}]
fromAlias string
发信人昵称,长度小于15个字符
replyAddress string
回信地址。示例:testxxx@example.com
code int 必填
返回码,详见返回码说明
msg string 必填
返回码对应描述
taskNo string 必填
本次请求号
data object 必填
返回数据
taskId string 必填
任务id
  • 200请求成功
  • 401API Key 无效或已过期,请检查密钥是否正确
  • 402余额不足,请充值后再试
  • 403IP 地址不在允许范围内或被限制访问
  • 404接口路由不存在,请检查接口地址
  • 429请求频率超限,请稍后再试
  • 500服务器内部错误,请联系技术支持
  • 502接口异常,或者传参错误,请联系技术支持
请求地址 https://api.zhuimengapi.com/api/v1/email
请求方式 POST
Content-Type application/x-www-form-urlencoded
鉴权 Header X-API-Key
Params Body
Params GET 请求只通过 URL 查询参数发送
Body 表单模式 POST + application/x-www-form-urlencoded 使用表单键值对请求体

快速信息

接口路由email
接口分类-
请求方式POST
计费方式0.2 积分/次
频率限制5 次/秒
认证方式X-API-Key
接口提供官方接口

如何调用

  1. 注册/登录本站账号
  2. 前往用户中心 → API密钥 ,创建一个密钥
  3. 在请求头添加 X-API-Key 携带密钥即可调用
  4. 每次成功调用将扣除 0.2 积分
前往创建 API 密钥