Create channel
POST/api/v1/notifications/channels
Create a new notification channel with configuration.
Request Body
name(string, required): Channel name. Max length: 100. Must not contain whitespace.channelType(string, required): Channel type. Valid values:email,teams,linemessage,webhook.description(string, optional): Channel description. Max length: 500.isEnabled(boolean, optional): Whether the channel is active. Default:true.commonSettings(object, optional): Common settings includingtimeout,retryAttempts,retryDelay.config(object, required): Channel-type-specific configuration (see per-type structure below).templateId(string, optional): Template identifier associated with this channel.recipients(array, optional): Default recipients for this channel.tags(array, optional): Tags for categorization.
Config Structure by channelType
| channelType | Required Fields | Optional Fields |
|---|---|---|
email | host, port (1-65535), username, password, senderEmail (email format) | senderName, secure |
teams | url (URL format) | - |
linemessage | accessToken, sendMode (push or multicast) | - |
webhook | url (URL format), method (GET/POST/PUT/DELETE), contentType (applicationJson/applicationFormUrlEncoded/textPlain) | - |
Recipients Validation (email channel)
target: must be valid email formattype: must betoorcc
Responses
201 Created: Channel created successfully.400 Bad Request: Validation error.409 Conflict: Channel with same name already exists.404 Not Found: Channel type not found.503 Service Unavailable: Channel validation failed.
Request
Responses
- 201
- 400
- 404
- 409
- 503
Channel created successfully
Bad Request
Not Found
Conflict
Service Unavailable