`POST /api/v1/channels` — create a notification channel (Admin only).
POST
/api/v1/channels
const url = 'https://example.com/api/v1/channels';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"channel_type":"example","config":"example","name":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/channels \ --header 'Content-Type: application/json' \ --data '{ "channel_type": "example", "config": "example", "name": "example" }'Request Body required
Section titled “Request Body required ” Media type application/json
Request body for POST /api/v1/channels.
object
channel_type
required
Channel type: webhook, discord, slack, or ntfy.
string
config
required
Type-specific configuration as a JSON object.
name
required
Human-readable label for the channel.
string
Example generated
{ "channel_type": "example", "config": "example", "name": "example"}Responses
Section titled “ Responses ”Channel created
Media type application/json
Response body for a single notification channel.
object
channel_type
required
string
config
required
created_at
required
integer format: int64
created_by
required
string
id
required
string
name
required
string
Example generated
{ "channel_type": "example", "config": "example", "created_at": 1, "created_by": "example", "id": "example", "name": "example"}Invalid request body or channel type
Admin role required