创建渠道类型
POST
/web/v1/notification-channel-types/command/createWEB创建一个新的通知渠道类型定义。
鉴权
需要有效的 JWT token 和 Turnstile 验证。Gateway 校验:enableJwtToken=true, enableTurnstile=true。
请求参数
请求体
NotificationChannelTypeCreateRequest:
| Name | Type | Required | In | Description |
|---|---|---|---|---|
channelCategory | string | Yes | body | 渠道分类枚举:EMAIL |
typeName | string | Yes | body | 类型显示名称(最长 128 字符) |
typeDescription | string | No | body | 类型描述(最长 512 字符) |
displayOrder | integer | No | body | 显示排序(默认:0) |
iconUrl | string | No | body | 图标 URL(最长 512 字符) |
extraConfig | string | No | body | 额外配置,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 无效或缺失) |
4030 | Turnstile 验证失败 |
说明
typeCode和typeValue由channelCategory枚举自动派生。- 渠道类型创建时默认状态为
ENABLED。