---
title: "Create a notification rule"
method: POST
path: "/network-notifications/v1/notification-rules"
tags: ["Notification Rules"]
---

# Create a notification rule

`POST /network-notifications/v1/notification-rules`

This API is used to create a notification rule.

## Request body

- object
  - `notificationRuleInput` NotificationRuleConfigInput — Notification rule config input details.
    - `name` string, required — Name of the notification rule.
    - `description` string — Description of the notification rule.
    - `enabled` boolean — Indicates whether the notification rule is enabled.
    - `sourceTypes` string[] — List of source types for the notification rule.
    - `source` NotificationRuleSourceInput — Data source details for the notification rule.
      - `alerts` NotificationRuleSourceAlertsInput — Alert source details for the notification rule.
        - `enabled` boolean, required — Indicates whether the alert source is enabled. NOTE: This field should be true to use alert source type. If this field is false, the notification rule will not be created.
        - `alertNames` string[], required — List of alert names for the notification rule. NOTE: Check the Alerts configuration API details for fetching the list of supported alerts.
        - `minAlertSeverity` 'CRITICAL' | 'MAJOR' | 'MINOR' | 'INFO' — Minimum alert severity for the notification rule.
    - `destination` NotificationRuleDestinationInput — Notification destination details for the notification rule. NOTE: At least one of the destination types (email, webhook or syslog) should be enabled to create or update a notification rule.
      - `email` NotificationRuleDestinationEmailInput — Email destination details for the notification rule.
        - `enabled` boolean, required — Indicates whether the email destination is enabled.
        - `emailIds` string[] — List of email addresses for the notification rule. NOTE: The contents of this field are ignored if email destination is not enabled.
      - `webhook` NotificationRuleDestinationWebhookInput — Webhook destination details for the notification rule.
        - `enabled` boolean, required — Indicates whether the webhook destination is enabled.
        - `webhookIds` string[] — List of webhook subscription UUIDs for the notification rule. The contents of this field are ignored if webhook destination is not enabled. NOTE: Check the Webhook API details for fetching the list of supported webhook subscription details.
      - `syslog` NotificationRuleDestinationSyslogInput — Syslog destination details for the notification rule. NOTE: Syslog destination is only supported in the Central On-Premise environment.
        - `enabled` boolean, required — Indicates whether the syslog destination is enabled.
        - `serverIds` string[] — List of syslog servers UUIDs for the notification rule. NOTE: The contents of this field are ignored if syslog destination is not enabled.

## Response `201`

Notification rule created successfully.

- NotificationRule — Notification rule details.
  - `id` string, required — Unique identifier of the notification rule.
  - `type` string, required — Type identifier for the notification rule.
  - `name` string, required — Name of the notification rule.
  - `description` string — Description of the notification rule.
  - `enabled` boolean — Indicates whether the notification rule is enabled.
  - `sourceTypes` string[] — List of source types for the notification rule.
  - `source` NotificationRuleSource — Data source details for the notification rule.
    - `alerts` NotificationRuleSourceAlerts — Alert source details for the notification rule.
      - `enabled` boolean — Indicates whether the alert source is enabled.
      - `alertNames` string[] — List of alert names for the notification rule.
      - `minAlertSeverity` 'CRITICAL' | 'MAJOR' | 'MINOR' | 'INFO' — Minimum alert severity for the notification rule.
  - `destination` NotificationRuleDestination — Notification destination details for the notification rule.
    - `email` NotificationRuleDestinationEmail — Email destination details for the notification rule.
      - `enabled` boolean — Indicates whether the email destination is enabled.
      - `emailIds` string[] — List of email addresses for the notification rule.
    - `webhook` NotificationRuleDestinationWebhook — Webhook destination details for the notification rule.
      - `enabled` boolean — Indicates whether the webhook destination is enabled.
      - `webhookIds` string[] — List of webhook subscription UUIDs for the notification rule.
    - `syslog` NotificationRuleDestinationSyslog — Syslog destination details for the notification rule. NOTE: Syslog destination is only supported in the Central On-Premise environment.
      - `enabled` boolean — Indicates whether the syslog destination is enabled.
      - `serverIds` string[] — List of syslog server UUIDs for the notification rule.

## Other responses

- `400` — Invalid input received.
- `401` — Unauthorized. Authentication credentials are required or invalid.
- `403` — Forbidden: Access is denied.
- `404` — Not Found error.
- `409` — Conflict. The request could not be completed because the resource already exists or is in a conflicting state.
- `422` — Unprocessable Entity. The request was well-formed but failed semantic validation.
- `429` — Too Many Requests. The user has sent too many requests in a given amount of time.
- `500` — Internal Server Error. An unexpected error occurred on the server.

---

[API](https://skmtc.net/arubanetworks/apis/authorization.md) · [All operations](https://skmtc.net/arubanetworks/apis/authorization/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/arubanetworks/authorization/revisions/74c95058b11f/schema)
