> ## 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 Red Flagged Calls

> List an agent's most recently red-flagged calls.



## OpenAPI

````yaml https://api.usetuner.ai/public/openapi.json get /api/v1/workspaces/{workspace_id}/agents/{agent_id}/calls/recent-red-flags
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}/calls/recent-red-flags:
    get:
      tags:
        - calls
        - calls
      summary: List Red Flagged Calls
      description: List an agent's most recently red-flagged calls.
      operationId: >-
        get_recent_red_flags_api_v1_workspaces__workspace_id__agents__agent_id__calls_recent_red_flags_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.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: Maximum number of red flags to return
            default: 5
            title: Limit
          description: Maximum number of red flags to return
        - name: start_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter calls from this date (inclusive)
            title: Start Date
          description: Filter calls from this date (inclusive)
        - name: end_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Filter calls up to this date (inclusive)
            title: End Date
          description: Filter calls up to this date (inclusive)
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RecentRedFlagResponse'
                title: >-
                  Response Get Recent Red Flags Api V1 Workspaces  Workspace Id 
                  Agents  Agent Id  Calls Recent Red Flags Get
        '400':
          description: '`end_date` is before `start_date`.'
          content:
            application/json:
              example:
                detail: end_date must be after start_date
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '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:
    RecentRedFlagResponse:
      properties:
        id:
          type: integer
          title: Id
          description: Call database ID
        call_id:
          type: string
          title: Call Id
          description: Provider call ID
        call_intent:
          anyOf:
            - type: string
            - type: 'null'
          title: Call Intent
          description: Call intent
        outcome:
          anyOf:
            - $ref: '#/components/schemas/OutcomeInfo'
            - type: 'null'
          description: Call outcome with value and type
        timestamp:
          type: string
          title: Timestamp
          description: Call timestamp in ISO 8601 format
        red_flag:
          type: string
          title: Red Flag
          description: Red flag name
      type: object
      required:
        - id
        - call_id
        - timestamp
        - red_flag
      title: RecentRedFlagResponse
      description: Response model for recent red flags.
    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
    OutcomeInfo:
      properties:
        value:
          anyOf:
            - type: string
            - type: 'null'
          title: Value
          description: Outcome value
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
          description: Outcome type
      type: object
      title: OutcomeInfo
      description: Outcome information with value and type.
    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

````