> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kodostatus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Notification Channel

> Create a new notification channel

## Body Parameters

<ParamField body="type" type="string" required>
  Channel type: `slack`, `webhook`, `discord`, `teams`, `pagerduty`, `sms`
</ParamField>

<ParamField body="name" type="string" required>
  Channel name
</ParamField>

<ParamField body="config" type="object" required>
  Channel-specific configuration (see examples below)
</ParamField>

<ParamField body="enabled" type="boolean" default="true">
  Whether the channel is active
</ParamField>

### Config by Type

<Tabs>
  <Tab title="Slack">
    ```json theme={null}
    {
      "webhook_url": "https://hooks.slack.com/services/..."
    }
    ```
  </Tab>

  <Tab title="Discord">
    ```json theme={null}
    {
      "webhook_url": "https://discord.com/api/webhooks/..."
    }
    ```
  </Tab>

  <Tab title="Teams">
    ```json theme={null}
    {
      "webhook_url": "https://outlook.office.com/webhook/..."
    }
    ```
  </Tab>

  <Tab title="SMS">
    ```json theme={null}
    {
      "phone_number": "+1234567890"
    }
    ```
  </Tab>

  <Tab title="PagerDuty">
    ```json theme={null}
    {
      "routing_key": "your_pagerduty_integration_key"
    }
    ```
  </Tab>

  <Tab title="Webhook">
    ```json theme={null}
    {
      "url": "https://your-server.com/webhook",
      "secret": "optional_signing_secret"
    }
    ```
  </Tab>
</Tabs>

## Response

Returns the created channel object.

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://kodostatus.com/api/v1/notifications/channels" \
    -H "X-API-Key: your_api_key" \
    -H "Content-Type: application/json" \
    -d '{
      "type": "slack",
      "name": "Engineering Alerts",
      "config": {
        "webhook_url": "https://hooks.slack.com/services/..."
      }
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "type": "slack",
    "name": "Engineering Alerts",
    "enabled": true,
    "config": { "webhook_url": "https://hooks.slack.com/..." },
    "notify_on_incident": true,
    "notify_on_maintenance": true,
    "created_at": "2026-02-20T08:00:00.000Z",
    "updated_at": "2026-02-20T08:00:00.000Z"
  }
  ```
</ResponseExample>
