更新通知渠道
POST
/web/v1/notification-channels/command/updateWEB更新已有的通知渠道。支持部分更新——仅修改非空字段。
鉴权
需要有效的 JWT token 和 Turnstile 验证。网关校验:enableJwtToken=true,enableTurnstile=true。
请求参数
请求体
NotificationChannelUpdateRequest:
| Name | Type | Required | In | Description |
|---|---|---|---|---|
bizId | string | Yes | body | 渠道业务 ID(最多 64 个字符) |
channelName | string | No | body | 新渠道名称(最多 255 个字符) |
channelRemark | string | No | body | 新渠道备注(最多 255 个字符) |
channelHost | string | No | body | 新渠道主机(最多 512 个字符) |
channelStatus | string | No | body | 新状态:ACTIVE、INACTIVE、PENDING、ERROR |
emailConfig | object | No | body | 更新的邮箱配置(字段详见创建接口) |
成功响应
成功200
{
"code": "2000",
"message": "SUCCESS",
"data": {
"bizId": "ch_abc123",
"institutionBizId": "inst_abc123",
"channelName": "Updated Email",
"channelRemark": "Production channel",
"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 | 渠道未找到 |
说明
- 仅请求体中提供的字段会被更新;省略的字段保持不变。
- 响应中密码已脱敏。