Uptimeify Docs
Notification channels

Create Notification Channel

Creates a new notification channel. Secrets in config are encrypted server-side.

POST /api/notification-channels

Request Body

FieldTypeRequiredDefaultDescription
typestringYesChannel type (see full list below)
namestringYesDisplay name
configobject|stringYesChannel configuration (see type table). Pass as JSON object or JSON string.
organizationIdnumberNofrom sessionOrganization scope
customerIdnumberNonullCustomer scope
websiteIdnumberNonullWebsite scope. Requires sourceChannelId.
sourceChannelIdnumber|stringConditionalnullParent channel ID for website overrides
categorystringNodirectdirect or integration
prioritynumberNo1Lower = higher priority
delaySecondsnumberNo0Delay before sending alert
conditionsobject|stringNonullAlert conditions (e.g., {"onlyFullService": true, "minIncidentDuration": 300})
isActivebooleanNotrueWhether the channel is active

Channel types

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

Integrations (category: "integration"): 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 for what each channel needs. You can validate a channel before saving with the Test Notification Channel endpoint.

Example (cURL) — Email channel

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@example.com", "to": "Ops Team" },
    "organizationId": 1
  }'

Example (cURL) — Slack channel

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

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://example.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 for error responses.

On this page