激活通知渠道
POST
/web/v1/notification-channels/command/activateWEB激活通知渠道,使其能够发送通知。
鉴权
需要有效的 JWT token 和 Turnstile 验证。网关校验:enableJwtToken=true,enableTurnstile=true。
请求参数
请求体
ChannelStatusRequest:
| Name | Type | Required | In | Description |
|---|---|---|---|---|
bizId | string | Yes | body | 要激活的渠道业务 ID |
成功响应
成功200
{
"code": "2000",
"message": "SUCCESS",
"data": {
"bizId": "ch_abc123",
"institutionBizId": "inst_abc123",
"channelName": "Main Email",
"channelRemark": null,
"channelHost": "smtp.example.com",
"channelCategory": "EMAIL",
"channelStatus": "ACTIVE",
"emailConfig": {
"smtpHost": "smtp.example.com",
"smtpPort": 587,
"senderEmail": "noreply@example.com",
"senderName": "Acme Corp",
"username": "noreply@example.com",
"password": "******",
"useSsl": true,
"useStartTls": false,
"connectionTimeout": 10000,
"readTimeout": 30000
},
"createdAt": "2026-03-21T00:00:00Z",
"updatedAt": "2026-03-21T01:00:00Z",
"createdBy": "user_xyz",
"updatedBy": "user_xyz"
}
}错误响应
| 错误码 | 描述 |
|---|---|
4000 | 校验错误(缺少 bizId) |
4010 | 未授权(无效或缺少 JWT token) |
4030 | Turnstile 验证失败 |
4040 | 渠道未找到 |
说明
- 渠道状态将从当前状态变更为
ACTIVE。 - 响应中邮箱配置的密码已脱敏。