A AuthMS API Wiki API Reference iam.tianv.com →

POST /internal/communication/send

提供给内部微服务调用的统一消息发送接口。支持短信、邮件、推送三种渠道,支持模板发送和内容直发两种模式。创建真实发送记录到数据库并异步尝试发送。使用 InternalAPIKeyAuth 认证。参考:ePrivacy Directive 2002/58/EC、CAN-SPAM Act。

通信服务 None application/json

Request Body

Schema: dto.InternalSendRequest

FieldTypeRequiredExampleConstraintsDescription
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`

Responses

StatusDescriptionSchema
200消息已入队/发送,返回消息ID和状态dto.InternalSendDetailResponse
400请求参数错误dto.SimpleResponse
500服务内部错误dto.SimpleResponse

Referenced Schemas

dto.InternalSendDetailResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
data dto.InternalSendResponse No
message string No
timestamp string No

dto.InternalSendResponse

内部统一发送接口的响应信息

FieldTypeRequiredExampleConstraintsDescription
channel string No email
message_id string No internal-1234567890
status string No queued
to string No user@example.com

dto.SimpleResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
message string No
timestamp string No