您的趋势 / API
REST API
API 参考
一个密钥,一个基础 URL。使用 Bearer API 密钥进行身份验证,并添加 X-Test-Mode: true 头以尝试调用而不发送任何内容或消耗配额。
基础 URL
https://yourtrend.online/api/v1认证
Authorization: Bearer …测试模式
X-Test-Mode: true快速入门
curl -X POST https://yourtrend.online/api/v1/messages \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"from":"you@yourdomain.com","to":"user@dest.com",
"subject":"Hi","html":"<p>Hello</p>"}'require 'yourtrend.php';
$yt = new YourTrend('YOUR_API_KEY');
$res = $yt->sendEmail(
'noreply@yourdomain.com',
'user@example.com',
'Hello from YourTrend',
'<h1>Hi!</h1>'
);
echo $res['status']; // 202const YourTrend = require('./yourtrend');
const yt = new YourTrend('YOUR_API_KEY');
const res = await yt.sendEmail(
'noreply@yourdomain.com',
'user@example.com',
'Hello from YourTrend',
'<h1>Hi!</h1>'
);
console.log(res.status); // 202from yourtrend import YourTrend
yt = YourTrend("YOUR_API_KEY")
res = yt.send_email(
"noreply@yourdomain.com",
"user@example.com",
"Hello from YourTrend",
"<h1>Hi!</h1>",
)
print(res["status"]) # 202package main
import "yourtrend"
func main() {
c := yourtrend.New("YOUR_API_KEY")
c.SendEmail(
"noreply@yourdomain.com",
"user@example.com",
"Hello from YourTrend",
"<h1>Hi!</h1>",
)
}SDK
单文件客户端,无依赖。
端点
电子邮件
-
POST
/messages发送事务性电子邮件 -
POST
/messages/batch发送一批电子邮件 -
GET
/messages列出已发送的消息
短信和渠道
-
POST
/sms发送短信 -
POST
/channels/{whatsapp|telegram|viber|rcs|voice}通过消息渠道发送
网页推送
-
GET
/push/vapid获取 VAPID 公钥 -
POST
/push/subscribe存储浏览器订阅 -
POST
/push广播通知
可送达性
-
POST
/deliverability/validate验证电子邮件地址 -
POST
/deliverability/spam-score在发送前评分电子邮件 -
POST
/deliverability/blocklist检查 IP 或域名是否在黑名单中 -
POST
/deliverability/dmarc导入 DMARC 汇总报告
联系人和活动
-
POST
/contacts创建联系人 -
POST
/contacts/import批量导入联系人 -
POST
/campaigns创建活动 -
POST
/campaigns/{id}/schedule在收件人时区安排活动 -
POST
/journeys创建多步骤旅程 -
POST
/forms创建带双重选择的注册表单
人工智能
-
POST
/ai/subject生成主题行 -
POST
/ai/compose生成电子邮件 -
POST
/ai/translate在 EN、UK 和 RU 之间翻译内容
入站
-
POST
/inbound/parse将原始入站电子邮件解析为 JSON
API 控制台
试试
从您的浏览器对实时 API 进行操作。使用测试密钥 — X-Test-Mode 会为您发送。
此页面是通过搜索找到的
真实的搜索查询将人们带到这里——高亮的查询打开匹配的页面。
- php sdk
- api rate limits
- smtp connection settings
- go sdk
- email api documentation
- node js sdk
- api key authentication
- email event webhooks
- openapi specification
- send an email via api
- python sdk
- curl request examples