Create Notification Channel
POST
/web/v1/notification-channels/command/create WEBCreates a new notification channel. Currently supports EMAIL channel type.
Required Headers
| Header | Example Value | Description |
|---|---|---|
| Content-Type | application/json | Request content type |
| Accept | application/json | Expected response type |
| X-Client-Hash | Client device fingerprint | |
| Accept-Language | en, zh, zh-Hant, ja, vi | Response language (default: en) |
| Authorization | Bearer | JWT access token |
Request Parameters
Request Body
NotificationChannelCreateRequest:
| Name | Type | Required | In | Description |
|---|---|---|---|---|
institutionBizId | string | Required | body | Institution business ID (max 64 characters) |
channelName | string | Required | body | Channel name (max 255 characters) |
channelRemark | string | Optional | body | Channel remark (max 255 characters) |
channelHost | string | Required | body | Channel host/access endpoint (max 512 characters) |
channelCategory | string | Required | body | Channel category enum: EMAIL |
emailConfig | object | Optional | body | Email configuration (required when channelCategory is EMAIL) |
emailConfig.smtpHost | string | Required | body | SMTP server hostname |
emailConfig.smtpPort | integer | Required | body | SMTP server port (1-65535) |
emailConfig.senderEmail | string | Required | body | Sender email address |
emailConfig.senderName | string | Required | body | Sender display name |
emailConfig.username | string | Required | body | SMTP authentication username |
emailConfig.password | string | Required | body | SMTP authentication password |
emailConfig.useSsl | boolean | Optional | body | Use SSL encryption (default: true) |
emailConfig.useStartTls | boolean | Optional | body | Use STARTTLS (default: false) |
emailConfig.connectionTimeout | integer | Optional | body | Connection timeout in milliseconds (default: 10000) |
emailConfig.readTimeout | integer | Optional | body | Read timeout in milliseconds (default: 30000) |
Success Response
Success 200
{
"code": "2000",
"message": "SUCCESS",
"data": {
"bizId": "ch_abc123",
"institutionBizId": "inst_abc123",
"channelName": "Main Email",
"channelRemark": null,
"channelHost": "smtp.example.com",
"channelCategory": "EMAIL",
"channelStatus": "PENDING",
"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-21T00:00:00Z",
"createdBy": "user_xyz",
"updatedBy": "user_xyz"
}
}Error Responses
| Code | Description |
|---|---|
4000 | Validation error (missing required fields, invalid email config) |
4010 | Unauthorized (invalid or missing JWT token) |
4030 | Turnstile verification failed |
Notes
- The password is masked as
******in the response for security. - When
channelCategoryisEMAIL, theemailConfigobject is required. - The channel is created with
PENDINGstatus initially.