POST /admin/communication/providers

为当前租户创建短信/邮件/推送服务商的连接配置。支持阿里云、腾讯云、AWS SNS/SES、SendGrid、FCM等主流服务商。配置内容(API密钥等)以加密方式存储,响应中自动脱敏。参考:ePrivacy Directive 2002/58/EC、CAN-SPAM Act。

通信服务 `bearerAuth` application/json

请求体

Schema: service-communication/internal/handler/dto.CreateProviderConfigRequest

字段类型必填示例约束描述
channel string 是 sms enum: `sms`, `email`, `push`
config string 是 {"access_key":"..."}
provider string 是 aliyun
priority integer 否 10

响应

状态描述Schema
201创建成功,返回配置详情(凭据已脱敏)service-communication/internal/handler/dto.ProviderConfigDataResponse
400请求参数错误dto.SimpleResponse
401未认证或令牌无效dto.SimpleResponse
403无权访问该资源dto.SimpleResponse
409同渠道同服务商的配置已存在dto.SimpleResponse
500服务内部错误dto.SimpleResponse

引用的 Schema

dto.SimpleResponse

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

service-communication/internal/handler/dto.ProviderConfigDataResponse

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

service-communication/internal/handler/dto.ProviderConfigResponse

字段类型必填示例约束描述
app_id string 否
channel string 否
config string 否
created_at string 否
id string 否
is_active boolean 否
priority integer 否
provider string 否
tenant_id string 否
updated_at string 否