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

POST /admin/communication/providers

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

通信服务 `bearerAuth` application/json

Request Body

Schema: dto.CreateProviderConfigRequest

FieldTypeRequiredExampleConstraintsDescription
channel string Yes sms enum: `sms`, `email`, `push`
config string Yes {"access_key":"..."}
provider string Yes aliyun
priority integer No 10

Responses

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

Referenced Schemas

dto.ProviderConfigDataResponse

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

dto.ProviderConfigResponse

FieldTypeRequiredExampleConstraintsDescription
app_id string No
channel string No
config string No
created_at string No
id string No
is_active boolean No
priority integer No
provider string No
tenant_id string No
updated_at string No

dto.SimpleResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
message string No
timestamp string No