---
title: "Create notification channel"
method: POST
path: "/notification-channels"
tags: ["notifications"]
---

# Create notification channel

`POST /notification-channels`

Creates a notification channel. Secret values are accepted
in the request but are never returned. Developer, manager, or admin only.

## Query parameters

- `remoteNode` string

## Request body

- NotificationChannelInput — Notification channel input
  - `name` string, required — Human-readable channel name
  - `type` 'email' | 'webhook' | 'slack' | 'telegram', required — Notification delivery provider
  - `enabled` boolean, required — Whether this channel can receive notifications
  - `email` NotificationEmailTarget — Email notification target. SMTP transport is configured in workspace notification settings.
    - `from` string — Sender address. Defaults to the workspace SMTP sender.
    - `to` string[], required — Primary recipients
    - `cc` string[] — CC recipients
    - `bcc` string[] — BCC recipients
    - `subjectPrefix` string — Subject prefix. Defaults to [DAGU].
    - `subjectTemplate` string — Optional email subject template. When set, it replaces the generated subject.
    - `bodyTemplate` string — Optional email body template. When omitted, Dagu sends the default notification body.
    - `attachLogs` boolean — Attach DAG and step logs when available
  - `webhook` NotificationWebhookTargetInput — Outbound webhook target input. Values are encrypted at rest.
    - `url` string, uri — HTTP or HTTPS endpoint to POST notification payloads to. Omit on updates to preserve the existing URL.
    - `headers` object — Additional request headers. Values are encrypted at rest. When provided, this replaces the stored header set.
    - `clearHeaders` boolean — Clear all stored webhook headers.
    - `hmacSecret` string — Optional HMAC secret for X-Dagu-Signature. Omit on updates to preserve the existing secret.
    - `clearHmacSecret` boolean — Clear the stored HMAC secret.
    - `messageTemplate` string — Optional rendered message added to the webhook JSON payload as message.
    - `allowInsecureHttp` boolean — Allow plain HTTP webhook URLs. Disabled by default.
    - `allowPrivateNetwork` boolean — Allow loopback or private network webhook targets. Disabled by default.
  - `slack` NotificationSlackTargetInput — Slack incoming webhook target input. Values are encrypted at rest.
    - `webhookUrl` string, uri — Slack incoming webhook URL. Omit on updates to preserve the existing URL.
    - `messageTemplate` string — Optional Slack message template. When omitted, Dagu sends the default notification text.
  - `telegram` NotificationTelegramTargetInput — Telegram Bot API target input. Bot token is encrypted at rest.
    - `botToken` string — Telegram bot token. Omit on updates to preserve the existing token.
    - `chatId` string — Telegram chat ID
    - `messageTemplate` string — Optional Telegram message template. When omitted, Dagu sends the default notification text.

## Response `201`

Notification channel created

- NotificationChannel — Notification channel. Secrets are never returned.
  - `id` string, required — Stable channel ID
  - `name` string, required — Human-readable channel name
  - `type` 'email' | 'webhook' | 'slack' | 'telegram', required — Notification delivery provider
  - `enabled` boolean, required — Whether this channel can receive notifications
  - `email` NotificationEmailTarget — Email notification target. SMTP transport is configured in workspace notification settings.
    - `from` string — Sender address. Defaults to the workspace SMTP sender.
    - `to` string[], required — Primary recipients
    - `cc` string[] — CC recipients
    - `bcc` string[] — BCC recipients
    - `subjectPrefix` string — Subject prefix. Defaults to [DAGU].
    - `subjectTemplate` string — Optional email subject template. When set, it replaces the generated subject.
    - `bodyTemplate` string — Optional email body template. When omitted, Dagu sends the default notification body.
    - `attachLogs` boolean — Attach DAG and step logs when available
  - `webhook` NotificationWebhookTarget — Public outbound webhook target details
    - `urlConfigured` boolean, required — Whether a webhook URL is configured
    - `urlPreview` string — Redacted URL preview
    - `headers` object — Header names with redacted values
    - `hmacSecretConfigured` boolean, required — Whether an HMAC secret is configured
    - `messageTemplate` string — Optional rendered message added to the webhook JSON payload as message.
    - `allowInsecureHttp` boolean — Whether this target allows plain HTTP webhook URLs
    - `allowPrivateNetwork` boolean — Whether this target allows loopback or private network webhook targets
  - `slack` NotificationSlackTarget — Public Slack target details
    - `webhookUrlConfigured` boolean, required — Whether a Slack incoming webhook URL is configured
    - `webhookUrlPreview` string — Redacted Slack webhook URL preview
    - `messageTemplate` string — Optional Slack message template. When omitted, Dagu sends the default notification text.
  - `telegram` NotificationTelegramTarget — Public Telegram target details
    - `botTokenConfigured` boolean, required — Whether a Telegram bot token is configured
    - `botTokenPreview` string — Redacted Telegram bot token preview
    - `chatId` string — Telegram chat ID
    - `messageTemplate` string — Optional Telegram message template. When omitted, Dagu sends the default notification text.
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required
  - `updatedBy` string — User ID that last updated the channel

## Other responses

- `400` — Invalid notification channel
- `403` — Forbidden - insufficient permissions
- `default` — Unexpected error

## Changes

- **2026-05-24** (v1) `8a2d5d3e9608` — 3 warning
  - added the new `rate_limited` enum value to the `code` response property for the response status `400`
  - added the new `rate_limited` enum value to the `code` response property for the response status `403`
  - added the new `rate_limited` enum value to the `code` response property for the response status `default`
- **2026-05-17** (v1) `0cce8472f3ba` — 1 info
  - endpoint added
- **2026-04-30** (v1) `50e1d517afc1` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/dagucloud/apis/dagu/changes/notification-channels/post.md)

---

[API](https://skmtc.dev/dagucloud/apis/dagu.md) · [All operations](https://skmtc.dev/dagucloud/apis/dagu/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/dagucloud/dagu/revisions/8a2d5d3e9608/schema)
