您可以连接哪些内容
已配置 设置 → 电子邮件提供商 由组织管理员设置——绝不会由营销人员针对每个营销活动设置。
SendGrid
使用 API 密钥连接您的 SendGrid 帐户。Flash 通过 v3 邮件 API 发送邮件。
Amazon SES(您的账户)
带上您自己的 AWS SES 账户(访问密钥/区域/验证来源)。与平台的后备 SES 不同。
定制 REST — 任何 ESP
将 Flash 指向任何提供商的 JSON 发送 API,并附带字段映射。无需等待适配器。
原始 SMTP 中继已在路线图上,但尚未可用 - 目前通过提供商的 API 连接。
备用瀑布流
每次发送都会按照您设置的优先顺序尝试您的提供商;失败或不可用的提供商将被跳过,交付将转至下一个。该平台的托管电子邮件服务始终是终端后备。
// Providers are tried in the priority order an admin sets. The list ALWAYS ends at
// the platform's managed Amazon SES account (the terminal fallback), which uses its
// own verified from-address so a fallback never bounces on an unverified domain.
Priority 1 → SendGrid (your account)
Priority 2 → Amazon SES (your own AWS account)
Priority 3 → Custom REST (any ESP with a send API)
Terminal → Platform Amazon SES (always on — the safety net)
// A provider that errors or is circuit-broken is skipped; delivery falls to the next.将任何 ESP 与自定义 REST 连接
如果您的提供商未内置,请通过其发送 API 连接它——提供端点、身份验证标头和字段映射。无需编写代码,也无需构建适配器。
// A "Custom REST" provider connects ANY ESP that exposes a JSON send API — no
// code, just configuration. An admin supplies the endpoint, the auth header, and a
// field map; Flash builds the request per message. Example (a generic ESP):
{
"provider": "custom_rest",
"config": {
"endpoint": "https://api.your-esp.com/v1/send",
"authHeader": "Authorization",
"authScheme": "Bearer", // → "Authorization: Bearer <apiKey>"
"toField": "to",
"fromField": "from",
"subjectField":"subject",
"htmlField": "html"
},
"secret": { "apiKey": "sk_live_…" } // encrypted at rest; never returned
}
// Per send, Flash POSTs: { "to": "...", "from": "...", "subject": "...", "html": "..." }
// with the auth header applied. 401/403 → credentials error (skip to next provider),
// 5xx/timeout → transient (skip to next provider). The HTML already carries Flash's
// own tracking pixel + link redirects, so opens/clicks keep working.将退订用户同步回 Flash
当您通过自己的提供商发送时,选择退出可能会在 Flash 之外通过您的 ESP、您的偏好中心或表单捕获。使用取消订阅API将它们推回,这样Flash就会在每次发送时抑制该地址。您还可以读取地址的选择退出状态。使用租户 API 密钥进行身份验证;电子邮件是身份。
// Push an opt-out INTO Flash — from your ESP's unsubscribe webhook, your own
// preference center, or a third-party form. Flash then suppresses this address on
// EVERY campaign send (the same signal the audience resolver checks). Idempotent.
POST https://flash.socialhub.ai/api/v2/members/unsubscribe
Authorization: Bearer fl_live_… // scope: members:write
Content-Type: application/json
{ "email": "ada@acme.com" }
// → 200 { "data": { "email": "ada@acme.com", "unsubscribed": true } }
// Read an address's opt-out status (e.g. reconcile before a bulk send):
GET https://flash.socialhub.ai/api/v2/members/unsubscribe?email=ada@acme.com
Authorization: Bearer fl_live_… // scope: members:read
// → 200 { "data": { "email": "ada@acme.com", "unsubscribed": true } }
// Re-subscribing is deliberately NOT an API toggle — re-granting marketing consent
// needs provable opt-in (CAN-SPAM / CASL), so it goes through the member's own
// consent flow, never this endpoint.