{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/athenahq-ai/json-schema/athenahq-ai-api-filters-schema.json",
  "title": "ApiFilters",
  "description": "Filters for querying responses and metrics. Pass location filters in the JSON body as `filters.location_ids`.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/athenahq-ai-analytics-api-openapi.yml#/components/schemas/ApiFilters",
  "type": "object",
  "required": [
    "start_date"
  ],
  "properties": {
    "schedule_id": {
      "$ref": "#/$defs/PromptScheduleSelection"
    },
    "start_date": {
      "type": "string",
      "format": "date-time",
      "description": "Filter start date (UTC)"
    },
    "end_date": {
      "type": "string",
      "format": "date-time",
      "description": "Filter end date (UTC)"
    },
    "models": {
      "type": "array",
      "description": "Filter by AI models",
      "items": {
        "type": "string",
        "enum": [
          "chatgpt",
          "perplexity",
          "gemini",
          "google_ai_overview",
          "copilot",
          "claude",
          "ai_mode",
          "grok",
          "deepseek",
          "meta_ai",
          "mistral"
        ]
      }
    },
    "prompt_ids": {
      "type": "array",
      "description": "Filter by specific prompt IDs",
      "items": {
        "type": "string",
        "format": "uuid"
      }
    },
    "competitor_ids": {
      "type": "array",
      "description": "Filter by specific competitor IDs",
      "items": {
        "type": "string",
        "format": "uuid"
      }
    },
    "location_ids": {
      "type": "array",
      "description": "Filter by location IDs. Pass this in the JSON body as `filters.location_ids`, even when filtering by a single location. Use IDs returned by `GET /api/v1/locations`.",
      "items": {
        "type": "string",
        "format": "uuid"
      }
    },
    "prompt_status": {
      "type": "string",
      "enum": [
        "active",
        "paused"
      ],
      "description": "Filter by prompt status"
    },
    "prompt_type": {
      "type": "string",
      "enum": [
        "branded",
        "non_branded"
      ],
      "description": "Filter by prompt type"
    }
  },
  "$defs": {
    "PromptScheduleSelection": {
      "description": "Select one streaming schedule. Use the selection returned by GET /api/v1/prompt-schedules. Default includes all pre-cutover history and ad hoc runs; archived schedules retain results. The retired manual token is accepted as an alias of default. This field takes one schedule; a list returns 400.",
      "default": "default",
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "default",
            "manual"
          ]
        },
        {
          "type": "string",
          "format": "uuid"
        }
      ]
    }
  }
}