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

# List Alert Definitions

> List all alert definitions configured for an agent.

Alert definitions notify a set of recipients (email) when a condition is
met on a call, based on evals, voice metrics, data extraction fields,
call metadata, or red flags.



## OpenAPI

````yaml https://api.usetuner.ai/public/openapi.json get /api/v1/workspaces/{workspace_id}/agents/{agent_id}/settings/alert-definitions
openapi: 3.1.0
info:
  title: My Public API
  version: 1.0.0
servers:
  - url: https://api.usetuner.ai
security: []
tags:
  - name: calls
    x-group: Calls
  - name: workspaces
    x-group: Workspaces
  - name: agent-settings
    x-group: Agent Settings
  - name: agents
    x-group: Agents
  - name: simulation
    x-group: Simulation
  - name: providers
    x-group: Providers
paths:
  /api/v1/workspaces/{workspace_id}/agents/{agent_id}/settings/alert-definitions:
    get:
      tags:
        - agent-settings
      summary: List Alert Definitions
      description: |-
        List all alert definitions configured for an agent.

        Alert definitions notify a set of recipients (email) when a condition is
        met on a call, based on evals, voice metrics, data extraction fields,
        call metadata, or red flags.
      operationId: >-
        list_alert_definitions_api_v1_workspaces__workspace_id__agents__agent_id__settings_alert_definitions_get
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: integer
            description: Tuner's internal numeric ID for the agent.
            title: Agent Id
          description: Tuner's internal numeric ID for the agent.
        - name: workspace_id
          in: path
          required: true
          schema:
            type: integer
            description: Workspace ID. Find this in Workspace > General Settings.
            title: Workspace Id
          description: Workspace ID. Find this in Workspace > General Settings.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AlertDefinitionResponse'
                title: >-
                  Response List Alert Definitions Api V1 Workspaces  Workspace
                  Id  Agents  Agent Id  Settings Alert Definitions Get
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              example:
                detail: Not authenticated
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: You do not have access to this workspace.
          content:
            application/json:
              example:
                detail: User does not have access to workspace 42
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Agent not found.
          content:
            application/json:
              example:
                detail: Agent with ID 17 not found
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Bearer: []
components:
  schemas:
    AlertDefinitionResponse:
      properties:
        id:
          type: integer
          title: Id
          description: Tuner's ID for this alert definition.
          examples:
            - 4
        agent_id:
          type: integer
          title: Agent Id
          description: Agent this alert belongs to.
          examples:
            - 17
        name:
          type: string
          title: Name
          description: Display name, used in notifications.
          examples:
            - High red-flag rate
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Note explaining what this alert watches for.
        severity:
          type: string
          title: Severity
          description: Severity label included in notifications.
          examples:
            - warning
        state:
          type: string
          title: State
          description: '`active` when the alert can fire, `paused` when it can''t.'
          examples:
            - active
        window_ms:
          type: integer
          title: Window Ms
          description: Rolling window in milliseconds. 300000 is five minutes.
          examples:
            - 300000
        cooldown_ms:
          type: integer
          title: Cooldown Ms
          description: Minimum time in milliseconds before this alert can fire again.
          examples:
            - 900000
        threshold_type:
          type: string
          title: Threshold Type
          description: >-
            `count` fires on an absolute number of matching calls, `percentage`
            on a share of the calls evaluated in the window.
          default: count
          examples:
            - percentage
        threshold_n:
          anyOf:
            - type: integer
            - type: 'null'
          title: Threshold N
          description: Matching calls needed to fire. Set in `count` mode.
        threshold_percentage:
          anyOf:
            - type: number
            - type: 'null'
          title: Threshold Percentage
          description: Share of evaluated calls needed to fire. Set in `percentage` mode.
          examples:
            - 20
        threshold_minimum:
          anyOf:
            - type: integer
            - type: 'null'
          title: Threshold Minimum
          description: >-
            Minimum matching calls before the percentage is applied. Set in
            `percentage` mode.
          examples:
            - 10
        recipients:
          items:
            type: string
          type: array
          title: Recipients
          description: Email addresses notified when the alert fires.
          examples:
            - - oncall@acme.com
        notification_channels:
          items:
            type: string
          type: array
          title: Notification Channels
          description: Where notifications are sent.
          examples:
            - - email
        condition_tree:
          additionalProperties: true
          type: object
          title: Condition Tree
          description: Condition a call must match to count toward the threshold.
          examples:
            - children:
                - lhs: eval.12
                  op: eq
                  rhs: FAIL
                  type: predicate
              op: AND
              type: group
        last_triggered:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Triggered
          description: When this alert last fired. Null if it never has.
          examples:
            - '2026-07-31T14:05:12Z'
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the alert was created.
          examples:
            - '2026-07-14T09:22:31Z'
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: When the alert was last updated.
          examples:
            - '2026-07-20T11:40:08Z'
        created_by:
          anyOf:
            - type: integer
            - type: 'null'
          title: Created By
          description: User who created the alert.
        updated_by:
          anyOf:
            - type: integer
            - type: 'null'
          title: Updated By
          description: User who last updated it.
      type: object
      required:
        - id
        - agent_id
        - name
        - severity
        - state
        - window_ms
        - cooldown_ms
        - recipients
        - notification_channels
        - condition_tree
        - created_at
        - updated_at
      title: AlertDefinitionResponse
      description: Response schema for an alert definition.
    ErrorResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Human-readable description of what went wrong.
      type: object
      required:
        - detail
      title: ErrorResponse
      description: Error body returned when a request fails.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    Bearer:
      type: http
      description: >-
        Use Tuner API key (tr_api_...) or user session token. Find your API key
        in Workspace Settings > API Keys.
      scheme: bearer

````