---
title: "Create Notification Rule Route"
method: POST
path: "/api/notifications/rules"
tags: ["notifications"]
---

# Create Notification Rule Route

`POST /api/notifications/rules`

## Request

- Base URL: `https://platform.verbiflow.com/api/bridge`
- URL: `https://platform.verbiflow.com/api/bridge/api/notifications/rules`
- Auth: one of:
  - HTTP bearer and API key in header `x-flage-org-id`
  - HTTP bearer and API key in header `x-flage-org-slug`

## Request body

- NotificationCreateRulePayload
  - `analysis` NotificationAnalysisInput
    - `enabled` boolean
    - `instruction` string
  - `creation_key` string, required
  - `delivery_mode` union, required
    - InstantDelivery
      - `kind` 'instant', required
    - DigestDeliveryInput
      - `digest_at` string, nullable
      - `digest_interval` 'hourly' | 'daily'
      - `digest_timezone` string, nullable
      - `kind` 'digest', required
  - `destination` union, required
    - SlackChannelDestination: One Slack channel selected as a notification destination.
      - `channel_id` string, required: Slack channel id that receives the notification.
      - `kind` 'slack_channel', required: Selects Slack channel delivery.
      - `team_id` string, required: Slack workspace id containing the destination channel.
    - SlackDmDestination
      - `kind` 'slack_dm', required
      - `slack_user_id` string, required
      - `team_id` string, required
    - EmailDestination
      - `email_address` string, required
      - `kind` 'email', required
    - MultipleDestination
      - `destinations` union[], required
        - union
          - SlackChannelDestination: One Slack channel selected as a notification destination.
            - `channel_id` string, required: Slack channel id that receives the notification.
            - `kind` 'slack_channel', required: Selects Slack channel delivery.
            - `team_id` string, required: Slack workspace id containing the destination channel.
          - SlackDmDestination
            - `kind` 'slack_dm', required
            - `slack_user_id` string, required
            - `team_id` string, required
          - EmailDestination
            - `email_address` string, required
            - `kind` 'email', required
      - `kind` 'multiple', required
  - `enabled` boolean, required
  - `event_keys` string[], required
  - `filters` NotificationFiltersInput
    - `bounce_classes` string[]
    - `first_touch_only` boolean: For open and click events, match only the first event of each kind.
    - `priority_bands` string[]
    - `reply_categories` string[]
    - `schedule_ids` string[]
    - `workflow_namespaces` string[]: Exact WorkflowSignalV1 or WorkflowSignalV2 namespaces; empty matches all.
  - `name` string, required
  - `notify_slack_user_ids` string[]
  - `purpose` string
  - `sequence_scope` union, required
    - AllScope
      - `kind` 'all', required
    - SequenceScope
      - `kind` 'sequences', required
      - `sequence_ids` string[], required
    - PlayScope
      - `kind` 'plays', required
      - `play_ids` string[], required
    - InboxScope
      - `kind` 'inbox', required
  - `version` integer

## Response `200`

Successful Response

- NotificationRuleCreated
  - `analysis` NotificationAnalysisOutput, required
    - `enabled` boolean, required
    - `instruction` string, required
  - `created` boolean, required
  - `created_at` string, date-time, required
  - `created_by_user_id` string, required
  - `delivery_mode` union, required
    - InstantDelivery
      - `kind` 'instant', required
    - DigestDeliveryOutput
      - `digest_at` string, nullable, required
      - `digest_interval` 'hourly' | 'daily', required
      - `digest_timezone` string, nullable, required
      - `kind` 'digest', required
  - `destination` union, required
    - SlackChannelDestination: One Slack channel selected as a notification destination.
      - `channel_id` string, required: Slack channel id that receives the notification.
      - `kind` 'slack_channel', required: Selects Slack channel delivery.
      - `team_id` string, required: Slack workspace id containing the destination channel.
    - SlackDmDestination
      - `kind` 'slack_dm', required
      - `slack_user_id` string, required
      - `team_id` string, required
    - EmailDestination
      - `email_address` string, required
      - `kind` 'email', required
    - MultipleDestination
      - `destinations` union[], required
        - union
          - SlackChannelDestination: One Slack channel selected as a notification destination.
            - `channel_id` string, required: Slack channel id that receives the notification.
            - `kind` 'slack_channel', required: Selects Slack channel delivery.
            - `team_id` string, required: Slack workspace id containing the destination channel.
          - SlackDmDestination
            - `kind` 'slack_dm', required
            - `slack_user_id` string, required
            - `team_id` string, required
          - EmailDestination
            - `email_address` string, required
            - `kind` 'email', required
      - `kind` 'multiple', required
  - `enabled` boolean, required
  - `event_keys` NotificationEventKey[], required
  - `filters` NotificationFiltersOutput, required
    - `bounce_classes` string[], required
    - `first_touch_only` boolean, required: For open and click events, match only the first event of each kind.
    - `priority_bands` string[], required
    - `reply_categories` string[], required
    - `schedule_ids` string[], required
    - `workflow_namespaces` string[], required: Exact WorkflowSignalV1 or WorkflowSignalV2 namespaces; empty matches all.
  - `health` 'ok' | 'erroring' | 'never_fired', required
  - `last_error` string, nullable, required
  - `last_fired_at` string, date-time, nullable, required
  - `name` string, required
  - `notify_slack_user_ids` string[], required
  - `organization_uuid` string, required
  - `purpose` string, required
  - `rule_id` string, required
  - `sequence_scope` union, required
    - AllScope
      - `kind` 'all', required
    - SequenceScope
      - `kind` 'sequences', required
      - `sequence_ids` string[], required
    - PlayScope
      - `kind` 'plays', required
      - `play_ids` string[], required
    - InboxScope
      - `kind` 'inbox', required
  - `updated_at` string, date-time, required
  - `version` integer, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/verbiflow/apis/verbiflow-sdk-http-contract.md) - [All operations](https://skmtc.dev/verbiflow/apis/verbiflow-sdk-http-contract/llms.txt) - [OpenAPI document](https://skmtc.dev/verbiflow/apis/verbiflow-sdk-http-contract/revisions/c80e903ef8f3?raw)
