Skip to content

创建渠道类型

POST/web/v1/notification-channel-types/command/createWEB

创建新的通知渠道类型定义。

鉴权

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

请求参数

请求体

NotificationChannelTypeCreateRequest

NameTypeRequiredInDescription
channelCategorystringYesbody渠道类别枚举:EMAIL
typeNamestringYesbody类型显示名称(最多 128 个字符)
typeDescriptionstringNobody类型描述(最多 512 个字符)
displayOrderintegerNobody显示排序顺序(默认值:0)
iconUrlstringNobody图标 URL(最多 512 个字符)
extraConfigstringNobody扩展配置(JSON 字符串)

成功响应

成功200
{
  "code": "2000",
  "message": "SUCCESS",
  "data": {
    "bizId": "ct_abc123",
    "typeCode": "EMAIL",
    "typeValue": 80010101,
    "typeName": "Email Notification",
    "typeDescription": "Standard email delivery",
    "typeStatus": "ENABLED",
    "displayOrder": 0,
    "iconUrl": null,
    "extraConfig": null,
    "createdAt": "2026-03-21T00:00:00Z",
    "updatedAt": "2026-03-21T00:00:00Z"
  }
}

错误响应

错误码描述
4000校验错误(缺少必填字段)
4010未授权(无效或缺少 JWT token)
4030Turnstile 验证失败

说明

  • typeCodetypeValuechannelCategory 枚举推导而来。
  • 渠道类型默认以 ENABLED 状态创建。

内部文档