Skip to content

更新通知渠道

POST/web/v1/notification-channels/command/updateWEB

更新已有的通知渠道。支持部分更新——仅修改非空字段。

鉴权

需要有效的 JWT token 和 Turnstile 验证。网关校验:enableJwtToken=trueenableTurnstile=true

请求参数

请求体

NotificationChannelUpdateRequest

NameTypeRequiredInDescription
bizIdstringYesbody渠道业务 ID(最多 64 个字符)
channelNamestringNobody新渠道名称(最多 255 个字符)
channelRemarkstringNobody新渠道备注(最多 255 个字符)
channelHoststringNobody新渠道主机(最多 512 个字符)
channelStatusstringNobody新状态:ACTIVE、INACTIVE、PENDING、ERROR
emailConfigobjectNobody更新的邮箱配置(字段详见创建接口)

成功响应

成功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)
4030Turnstile 验证失败
4040渠道未找到

说明

  • 仅请求体中提供的字段会被更新;省略的字段保持不变。
  • 响应中密码已脱敏。

内部文档