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

# Create an Alert Rule

> Creates an alert rule from a registered template.



## OpenAPI

````yaml post /v1/risk/alert-rules
openapi: 3.0.0
info:
  title: Range Risk API
  description: The Range Risk API for risk assessment of crypto addresses.
  version: 1.7.8
  contact: {}
servers:
  - url: https://api.range.org
    description: Range API Server
security:
  - Authorization: []
tags:
  - name: Risk
    description: Get risk information about a crypto address.
  - name: Risk v2
    description: >-
      Address risk assessment, workspace configuration, and signals catalogue
      (API v2).
  - name: Simulator
    description: Simulate a transaction on a network.
  - name: Alert Templates
    description: Browse alert rule templates available to the workspace.
  - name: Alert Rules
    description: Create and manage workspace alert rules.
  - name: Alert Events
    description: List and retrieve fired alert events.
  - name: Channels
    description: Configure alert delivery channels.
paths:
  /v1/risk/alert-rules:
    post:
      tags:
        - Alert Rules
      summary: Create an alert rule
      description: >-
        Creates an alert rule from a registered template. Supply the template
        id; rule_type, network, and runner_id are copied from it (not supplied).
      operationId: createRule
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAlertRuleDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertRuleDto'
components:
  schemas:
    CreateAlertRuleDto:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: >-
            The id of the template this rule instantiates. The template supplies
            the rule_type, network, runner_id, severity, and trigger.
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        name:
          type: string
          maxLength: 255
          description: Display name for the rule.
          example: High gas on eth
        severity:
          type: string
          maxLength: 255
          description: Severity override. Defaults to the matched template severity.
          example: high
        parameters:
          type: object
          description: >-
            User-supplied parameter values, as a `{ field: value }` object. A
            `[{ field, value }]` array or single-element wrapper is also
            accepted and normalized to an object on write.
          additionalProperties: true
        trigger:
          type: string
          description: Trigger override. Defaults to the matched template trigger.
          enum:
            - BLOCK
            - TICK
      required:
        - id
    AlertRuleDto:
      type: object
      properties:
        id:
          type: string
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        workspace_id:
          type: string
          example: workspace-123
        name:
          type: string
          nullable: true
          example: High gas on eth
        rule_type:
          type: string
          example: GasPressure
        network:
          type: string
          nullable: true
          example: eth
        severity:
          type: string
          example: high
        parameters:
          type: object
          additionalProperties: true
          example:
            threshold: 90
        trigger:
          type: string
          enum:
            - BLOCK
            - TICK
          example: BLOCK
        enabled:
          type: boolean
          example: true
        version:
          type: number
          description: Incremented each time the rule parameters change. Starts at 1.
          example: 1
        subscribed_channels:
          example:
            - alert_channel_id: 44444444-4444-4444-4444-444444444445
              min_severity: null
          type: array
          items:
            $ref: '#/components/schemas/SubscribedChannelDto'
        runner_id:
          type: string
          nullable: true
          example: alert-runner-eth-v2
        created_at:
          type: string
          example: '2026-05-14T12:00:00.000Z'
        updated_at:
          type: string
          example: '2026-05-14T12:00:00.000Z'
      required:
        - id
        - workspace_id
        - rule_type
        - severity
        - parameters
        - trigger
        - enabled
        - version
        - subscribed_channels
        - created_at
        - updated_at
    SubscribedChannelDto:
      type: object
      properties:
        alert_channel_id:
          type: string
          example: 44444444-4444-4444-4444-444444444445
        min_severity:
          nullable: true
          enum:
            - info
            - low
            - medium
            - high
            - critical
          type: string
          example: null
      required:
        - alert_channel_id
  securitySchemes:
    Authorization:
      scheme: bearer
      bearerFormat: API Key
      description: 'Use Authorization: Bearer <api-key>'
      type: http

````