POST /notifications/test

向指定渠道和目标发送一条测试通知,创建测试通知记录到数据库,用于验证通知服务配置是否正确 参考:CAN-SPAM Act (15 U.S.C. §7701) — Commercial Email Compliance。

通知服务 `bearerAuth` application/json

请求体

Schema: service-notification/internal/handler/dto.TestNotificationRequest

字段类型必填示例约束描述
channel string 是 email 渠道
target string 是 user@example.com 目标

响应

引用的 Schema

service-core/base/dto.SimpleResponse

字段类型必填示例约束描述
code integer 否
message string 否
timestamp string 否

service-notification/internal/handler/dto.TestNotificationDetailResponse

字段类型必填示例约束描述
code integer 否
data service-notification/internal/handler/dto.TestNotificationResponse 否
message string 否

service-notification/internal/handler/dto.TestNotificationResponse

测试通知发送结果

字段类型必填示例约束描述
channel string 否 email 渠道
status string 否 sent 状态
target string 否 user@example.com 目标
test_id string 否 test-1234567890 测试ID