Skip to content

激活通知渠道

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

激活一个通知渠道,使其能够发送通知。

鉴权

需要有效的 JWT token 和 Turnstile 验证。Gateway 校验:enableJwtToken=true, enableTurnstile=true

请求参数

请求体

ChannelStatusRequest:

NameTypeRequiredInDescription
bizIdstringYesbody要激活的渠道业务 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 无效或缺失)
4030Turnstile 验证失败
4040渠道未找到

说明

  • 渠道状态将从当前状态变更为 ACTIVE
  • 响应中的邮箱配置密码已脱敏。

内部文档