POST /internal/communication/send
提供给内部微服务调用的统一消息发送接口。支持短信、邮件、推送三种渠道,支持模板发送和内容直发两种模式。创建真实发送记录到数据库并异步尝试发送。使用 InternalAPIKeyAuth 认证。参考:ePrivacy Directive 2002/58/EC、CAN-SPAM Act。
通信服务 None application/json
Request Body
Schema: dto.InternalSendRequest
| Field | Type | Required | Example | Constraints | Description |
channel |
string |
Yes |
email |
|
|
to |
string |
Yes |
user@example.com |
|
|
content |
string |
No |
您的验证码是123456 |
|
|
metadata |
object |
No |
|
extra keys: `string` |
|
subject |
string |
No |
账户激活 |
|
|
template |
string |
No |
welcome |
|
|
user_id |
string |
No |
usr_abc123 |
|
|
variables |
object |
No |
|
extra keys: `string` |
|
Referenced Schemas
dto.InternalSendDetailResponse
| Field | Type | Required | Example | Constraints | Description |
code |
integer |
No |
|
|
|
data |
dto.InternalSendResponse |
No |
|
|
|
message |
string |
No |
|
|
|
timestamp |
string |
No |
|
|
|
dto.InternalSendResponse
内部统一发送接口的响应信息
| Field | Type | Required | Example | Constraints | Description |
channel |
string |
No |
email |
|
|
message_id |
string |
No |
internal-1234567890 |
|
|
status |
string |
No |
queued |
|
|
to |
string |
No |
user@example.com |
|
|
dto.SimpleResponse
| Field | Type | Required | Example | Constraints | Description |
code |
integer |
No |
|
|
|
message |
string |
No |
|
|
|
timestamp |
string |
No |
|
|
|