> ## 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 active alerts

> List alert rules that are currently in the `alert` state.



## OpenAPI

````yaml GET /v1/alerts
openapi: 3.1.0
info:
  title: PolyAI Alerts API
  version: 1.0.8
  description: Manage alert rules and query active alerts.
servers:
  - url: https://api.us.poly.ai
    description: US region
  - url: https://api.eu.poly.ai
    description: EU region
  - url: https://api.uk.poly.ai
    description: UK region
  - url: https://api.studio.poly.ai
    description: Studio region
security:
  - ApiKeyAuth: []
paths:
  /v1/alerts:
    get:
      summary: Get active alerts
      description: List alert rules that are currently in the `alert` state.
      operationId: getActiveAlerts
      parameters:
        - $ref: '#/components/parameters/ProjectIdFilter'
        - $ref: '#/components/parameters/MetricFilter'
      responses:
        '200':
          description: Active alerts retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActiveAlertsListResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    ProjectIdFilter:
      name: project_id
      in: query
      required: false
      description: Filter by project ID
      schema:
        type: string
    MetricFilter:
      name: metric
      in: query
      required: false
      description: Filter by metric
      schema:
        $ref: '#/components/schemas/AlertMetric'
  schemas:
    ActiveAlertsListResponse:
      type: object
      description: Every alert rule currently in the firing state.
      required:
        - data
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ActiveAlertResponse'
    AlertMetric:
      type: string
      description: Metric to monitor.
      enum:
        - turn_latency_p50
        - turn_latency_p95
        - api_errors
        - function_errors
        - call_crashes
        - call_volume
    ActiveAlertResponse:
      type: object
      description: >-
        An alert rule that is currently firing, with details about why and when
        it triggered.
      required:
        - alert_rule_id
        - name
        - metric
        - operator
        - threshold_value
        - window_duration
        - since
      properties:
        alert_rule_id:
          type: string
          description: Alert rule ID
          pattern: ^ar_[A-Za-z0-9]+$
          example: ar_0Kx4mNpQ8rWvYb2dFgHjLs
        name:
          type: string
          description: Alert rule name
        project_id:
          type:
            - string
            - 'null'
          description: Project ID
        metric:
          $ref: '#/components/schemas/AlertMetric'
        operator:
          $ref: '#/components/schemas/AlertOperator'
        threshold_value:
          type: integer
          description: Threshold value
        window_duration:
          $ref: '#/components/schemas/WindowDuration'
        since:
          type: string
          format: date-time
          description: When the alert started firing
        last_evaluated_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Last evaluation timestamp
        current_value:
          type:
            - integer
            - 'null'
          description: Current metric value
    Error:
      type: object
      properties:
        message:
          type: string
    AlertOperator:
      type: string
      description: Comparison operator used by the alert rule.
      enum:
        - '>'
        - <
        - '>='
        - <=
    WindowDuration:
      type: string
      description: 'Evaluation window duration. Allowed values: `5m`, `10m`, or `60m`.'
      enum:
        - 5m
        - 10m
        - 60m
  responses:
    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
      description: >-
        An API key is a token that you provide when making API calls. Include
        the token in a header parameter called `X-API-KEY`.

````