> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.idenfy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a notification rule

> Creates a rule that announces alerts to a channel as they are raised. `severityFilter` lists the severities that qualify — narrow it, or a busy detection rule will flood the channel.

These notifications tell people something happened; webhooks are what a system integrates against. Alerts from test transactions never notify.



## OpenAPI

````yaml /openapi/transaction-monitoring.json post /api/v1/notification-rules/
openapi: 3.0.3
info:
  title: iDenfy Transaction Monitoring API
  version: v1
  description: >-
    Submit transactions and events for AML monitoring, and read back the alerts,
    cases and reports they produce.
servers:
  - url: https://ivs-tx-monitoring.idenfy.com
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Ingest
    description: Submit transactions and events for monitoring.
  - name: Transactions
    description: Read back submitted transactions and their rule hits.
  - name: Rules
    description: Detection rules evaluated against every submission.
  - name: Alerts
    description: Alerts opened when a rule matches.
  - name: Investigations
    description: Cases opened from one or more alerts.
  - name: SARs
    description: Suspicious activity reports and their attachments.
  - name: Sanctions screening
    description: Sanctions and PEP screening of transaction parties.
  - name: AML monitoring
    description: Ongoing AML monitoring of screened parties.
  - name: Party suspensions
    description: ''
  - name: Webhooks
    description: Outbound event delivery to your endpoints.
  - name: Custom fields
    description: Your own transaction attributes, declared so rules can match them.
  - name: Reference lists
    description: Named value lists rules can reference.
  - name: Notification rules
    description: Slack and email notifications for alerts.
  - name: Reports
    description: Generated compliance reports.
paths:
  /api/v1/notification-rules/:
    post:
      tags:
        - Notification rules
      summary: Create a notification rule
      description: >-
        Creates a rule that announces alerts to a channel as they are raised.
        `severityFilter` lists the severities that qualify — narrow it, or a
        busy detection rule will flood the channel.


        These notifications tell people something happened; webhooks are what a
        system integrates against. Alerts from test transactions never notify.
      operationId: notification_rules_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NotificationRuleCreate'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/NotificationRuleCreate'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/NotificationRuleCreate'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationRuleResponse'
          description: ''
      security:
        - ApiKeyAuth: []
components:
  schemas:
    NotificationRuleCreate:
      type: object
      properties:
        partnerId:
          type: string
          writeOnly: true
          nullable: true
          description: >-
            Target partner id; honored only for multi-partner operators, ignored
            otherwise.
        ruleId:
          type: string
          format: uuid
          nullable: true
          description: >-
            Announce only alerts raised by this detection rule; omit to cover
            every rule
        channel:
          allOf:
            - $ref: '#/components/schemas/ChannelEnum'
          description: |-
            How the notification is sent

            * `SLACK` - Slack
            * `EMAIL` - Email
            * `WEBHOOK` - Webhook
        destination:
          type: string
          description: >-
            Where it is sent — an email address, or the channel address for the
            chosen channel
          maxLength: 500
        secret:
          type: string
          writeOnly: true
          description: >-
            Secret used to sign each delivery, as an HMAC-SHA256 of the signing
            timestamp and the body. Never returned on a read: omit it to keep
            the stored one, or on create to have one generated
          maxLength: 255
        headers:
          type: object
          additionalProperties:
            type: string
            maxLength: 1024
          writeOnly: true
          description: >-
            Fixed headers added to every delivery, for an endpoint behind its
            own authentication. At most 10, and never returned on a read. The
            content type, signature, timestamp and event-type headers are set
            automatically and cannot be overridden
        severityFilter:
          type: array
          items:
            type: string
          description: >-
            Alert severities that qualify. Narrow it, or a busy detection rule
            will flood the destination
        isActive:
          type: boolean
          default: true
          description: Whether this rule currently announces anything
      required:
        - channel
        - destination
    NotificationRuleResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
          description: Primary key
        partnerId:
          type: integer
          readOnly: true
        ruleId:
          type: string
          format: uuid
          readOnly: true
        channel:
          allOf:
            - $ref: '#/components/schemas/ChannelEnum'
          readOnly: true
          description: |-
            Delivery channel

            * `SLACK` - Slack
            * `EMAIL` - Email
            * `WEBHOOK` - Webhook
        destination:
          type: string
          readOnly: true
          description: Slack/webhook URL or email address
        severityFilter:
          readOnly: true
          description: Alert severities that trigger this rule
        isActive:
          type: boolean
          readOnly: true
          description: Whether this rule is currently enforced
        createdAt:
          type: string
          format: date-time
          readOnly: true
        updatedAt:
          type: string
          format: date-time
          readOnly: true
      required:
        - channel
        - createdAt
        - destination
        - id
        - isActive
        - partnerId
        - ruleId
        - severityFilter
        - updatedAt
    ChannelEnum:
      enum:
        - SLACK
        - EMAIL
        - WEBHOOK
      type: string
      description: |-
        * `SLACK` - Slack
        * `EMAIL` - Email
        * `WEBHOOK` - Webhook
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````

## Related topics

- [Update a notification rule](https://documentation.idenfy.com/api-reference/transaction-monitoring/notification-rules/update-a-notification-rule.md)
- [Replace a notification rule](https://documentation.idenfy.com/api-reference/transaction-monitoring/notification-rules/replace-a-notification-rule.md)
- [Create a rule](https://documentation.idenfy.com/api-reference/transaction-monitoring/rules/create-a-rule.md)
- [Delete a notification rule](https://documentation.idenfy.com/api-reference/transaction-monitoring/notification-rules/delete-a-notification-rule.md)
- [List notification rules](https://documentation.idenfy.com/api-reference/transaction-monitoring/notification-rules/list-notification-rules.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.