---
title: "Create channel"
method: POST
path: "/api/channels"
tags: ["Channels"]
---

# Create channel

`POST /api/channels`

## Request

- Base URL: `https://dregs.com`
- URL: `https://dregs.com/api/channels`
- Auth: HTTP bearer

Creates a new notification channel. A webhook channel's response includes the signing secret, which is shown only this once. Other channel types return the channel without a secret.

## Request body

- V1CreateChannelRequest
  - `name` string
  - `type` string
  - `config` object
  - `secrets` object

## Response `200`

Channel created. Webhook channels include the signing secret.

- union: A webhook channel includes its signing secret. Other channel types do not.
  - V1Channel
    - `id` integer
    - `slug` string
    - `name` string
    - `type` 'EMAIL' | 'WEBHOOK' | 'SLACK' | 'SMS'
    - `config` object
    - `enabled` boolean
    - `createdAt` string, date-time
  - V1ChannelWithSecret
    - `id` integer
    - `slug` string
    - `name` string
    - `type` 'EMAIL' | 'WEBHOOK' | 'SLACK' | 'SMS'
    - `config` object
    - `secret` string
    - `enabled` boolean
    - `createdAt` string, date-time

## Other responses

- `400`: Invalid request
- `403`: Admin role required

---

[API](https://skmtc.dev/dregs/apis/dregs-api.md) · [All operations](https://skmtc.dev/dregs/apis/dregs-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dregs/apis/dregs-api/revisions/ea71f8c1eed4?raw)
