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

# Create alert rule

> Creates a Prometheus alert rule used for model monitoring.



## OpenAPI

````yaml /api-spec.json post /core/alerts/rules
openapi: 3.0.0
info:
  contact:
    name: Acusight API Support
  description: >-
    Acusight platform API - custom endpoints + Portainer proxy routes for edge
    AI deployments
  title: Acusight API
  version: 1.0.0
servers:
  - url: https://acusight.io/api
    description: AcuSight Cloud (hosted)
security: []
tags:
  - name: Devices & provisioning
    description: Register, provision, and manage edge devices and their agents.
  - name: Virtual devices
    description: Create and drive simulated devices for testing and demos.
  - name: Alerts & telemetry
    description: Model alerts, alert rules, and product telemetry.
  - name: Organization
    description: Organization-level settings.
  - name: Datasets & data
    description: Projects, batches, datasets, images, annotations, and drift.
  - name: Models & training
    description: Model registry, training jobs, exports, and inference.
  - name: Pipeline data
    description: Detection time-series and aggregated pipeline analytics.
paths:
  /core/alerts/rules:
    post:
      tags:
        - Alerts & telemetry
      summary: Create alert rule
      description: Creates a Prometheus alert rule used for model monitoring.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/handlers.AlertRuleDefinition'
        description: Alert rule definition
        required: true
      responses:
        '201':
          description: Alert rule created
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
        '400':
          description: Invalid alert rule definition
          content:
            application/json:
              schema:
                additionalProperties:
                  type: string
                type: object
        '409':
          description: Alert rule already exists
          content:
            application/json:
              schema:
                additionalProperties:
                  type: string
                type: object
        '500':
          description: Failed to save alert rule
          content:
            application/json:
              schema:
                additionalProperties:
                  type: string
                type: object
      security:
        - BearerAuth: []
components:
  schemas:
    handlers.AlertRuleDefinition:
      properties:
        class:
          type: string
        comparison:
          type: string
        description:
          type: string
        device_ids:
          items:
            type: string
          type: array
        duration:
          type: string
        metric:
          type: string
        model_id:
          description: required
          type: string
        name:
          type: string
        severity:
          type: string
        threshold:
          type: number
        window:
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT access token. Paste the token only; the Bearer prefix is added
        automatically.

````