---
title: "Create Notification Channel"
description: "Creates a new notification channel. Secrets in config are encrypted server-side."
---

`POST /api/notification-channels`

## Request Body

| Field | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|
| `type` | string | Yes | - | Channel type (see full list below) |
| `name` | string | Yes | - | Display name |
| `config` | object\|string | Yes | - | Channel configuration (see type table). Pass as JSON object or JSON string. |
| `organizationId` | number | No | from session | Organization scope |
| `customerId` | number | No | null | Customer scope |
| `websiteId` | number | No | null | Website scope. Requires `sourceChannelId`. |
| `sourceChannelId` | number\|string | Conditional | null | Parent channel ID for website overrides |
| `category` | string | No | `direct` | `direct` or `integration` |
| `priority` | number | No | 1 | Lower = higher priority |
| `delaySeconds` | number | No | 0 | Delay before sending alert |
| `conditions` | object\|string | No | null | Alert conditions (e.g., `{"onlyFullService": true, "minIncidentDuration": 300}`) |
| `isActive` | boolean | No | true | Whether the channel is active |

## Channel types

Direct (`category: "direct"`): `email`, `sms`, `webhook`.

Integrations (`category: "integration"`): `incident_management`, `slack`, `discord`, `teams`, `pagerduty`, `opsgenie`, `allquiet`, `telegram`, `googlechat`, `mattermost`, `rocketchat`, `matrix`, `lark`, `dingtalk`, `wecom`, `ilert`, `grafanaoncall`, `squadcast`, `incidentio`, `pushover`, `ntfy`, `gotify`, `jira`, `github`, `gitlab`, `linear`, `servicenow`.

The `config` fields depend on the type: see [Integrations](/integrations) for what each channel needs. You can validate a channel before saving with the [Test Notification Channel](/api/notification-channels/test-notification-channel) endpoint.

### `incident_management`

Uptimeify's own Incident Management is an integration channel like any other, with two differences:

- It takes an **empty `config`** (`{}`). There is no endpoint and no credential, confirmed outages are delivered internally.
- It is **not testable**: the [Test Notification Channel](/api/notification-channels/test-notification-channel) endpoint does not support this type.

What the channel controls is *which* monitors page through Incident Management. Its scope (`customerId` / `websiteId`, both optional, omit both for the whole organization) and its `allowedPackageTypes` decide whose confirmed outages become IM incidents; everything else stays on classic notifications. A monitoring outage only reaches Incident Management when a matching, active channel exists **and** the customer's package has integration alerts enabled.

## Example (cURL): Email channel

```bash
curl -X POST "$BASE_URL/api/notification-channels" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "email",
    "name": "Ops Email",
    "config": { "email": "ops@deinkunde.com", "to": "Ops Team" },
    "organizationId": 1
  }'
```

## Example (cURL): Slack channel

```bash
curl -X POST "$BASE_URL/api/notification-channels" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "slack",
    "name": "Alerts Slack Channel",
    "config": { "secret": "https://hooks.slack.com/services/T00/B00/xxx" },
    "organizationId": 1
  }'
```

## Example (cURL): Webhook channel

```bash
curl -X POST "$BASE_URL/api/notification-channels" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "webhook",
    "name": "Custom Webhook",
    "config": {
      "url": "https://deinkunde.com/webhook",
      "method": "POST",
      "headers": { "X-Custom-Header": "value" },
      "bodyTemplate": "{\"text\": \"{{websiteName}} is {{status}}\"}",
      "timeout": 30,
      "retryAttempts": 3,
      "retryDelay": 60,
      "expectedStatusCodes": "200,201,204"
    },
    "organizationId": 1
  }'
```

## Common errors

- `401 Unauthorized` when not authenticated
- `403 Forbidden` when creating channels for an organization you cannot write to
- `409 Conflict` when a duplicate website-level override already exists

## Response

Returns the created notification channel object. See [Error Codes](/api/error-codes-and-known-pitfalls) for error responses.
