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

# List alert rules



## OpenAPI

````yaml GET /v1/alert-rules
openapi: 3.1.0
info:
  title: PolyAI Alerts API
  version: 1.0.0
  description: >-
    Create alert rules, inspect active alerts, register webhook endpoints, and
    receive signed webhook notifications when alert thresholds are breached.
servers:
  - url: https://api.us.poly.ai
    description: US region
  - url: https://api.uk.poly.ai
    description: UK region
  - url: https://api.eu.poly.ai
    description: EU region
security:
  - ApiKeyAuth: []
paths:
  /v1/alert-rules:
    get:
      summary: List alert rules
      operationId: listAlertRules
      parameters:
        - $ref: '#/components/parameters/EnabledFilter'
        - $ref: '#/components/parameters/MetricFilter'
        - $ref: '#/components/parameters/ProjectIdFilter'
        - $ref: '#/components/parameters/StateFilter'
      responses:
        '200':
          description: Alert rules retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertRuleListResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    EnabledFilter:
      name: enabled
      in: query
      required: false
      schema:
        type: boolean
    MetricFilter:
      name: metric
      in: query
      required: false
      schema:
        $ref: '#/components/schemas/Metric'
    ProjectIdFilter:
      name: project_id
      in: query
      required: false
      schema:
        type: string
    StateFilter:
      name: state
      in: query
      required: false
      schema:
        $ref: '#/components/schemas/AlertState'
  schemas:
    AlertRuleListResponse:
      type: object
      required:
        - data
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/AlertRule'
    Metric:
      type: string
      enum:
        - turn_latency_p50
        - turn_latency_p95
        - api_errors
        - function_errors
        - call_crashes
        - call_volume
    AlertState:
      type: string
      enum:
        - ok
        - alert
        - no_data
        - unknown
    AlertRule:
      type: object
      required:
        - id
        - name
        - metric
        - operator
        - threshold_value
        - window_duration
        - enabled
        - current_state
        - created_at
        - updated_at
      properties:
        id:
          type: string
          pattern: ^ar_[A-Za-z0-9]+$
          example: ar_0Kx4mNpQ8rWvYb2dFgHjLs
        name:
          type: string
        project_id:
          type:
            - string
            - 'null'
        metric:
          $ref: '#/components/schemas/Metric'
        operator:
          $ref: '#/components/schemas/ComparisonOperator'
        threshold_value:
          type: integer
          minimum: 0
        window_duration:
          $ref: '#/components/schemas/WindowDuration'
        enabled:
          type: boolean
          default: true
        current_state:
          $ref: '#/components/schemas/AlertState'
        since:
          type:
            - string
            - 'null'
          format: date-time
        last_evaluated_at:
          type:
            - string
            - 'null'
          format: date-time
        current_value:
          type:
            - integer
            - 'null'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        message:
          type: string
    ComparisonOperator:
      type: string
      enum:
        - '>'
        - <
        - '>='
        - <=
    WindowDuration:
      type: string
      description: Evaluation window duration
      enum:
        - 5m
        - 10m
        - 60m
  responses:
    BadRequest:
      description: Validation error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: Internal server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````