{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/athenahq-ai/json-schema/athenahq-ai-content-list-request-schema.json",
  "title": "ContentListRequest",
  "description": "Request body for listing tracked content.",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/athenahq-ai-openapi.json#/components/schemas/ContentListRequest",
  "type": "object",
  "required": [
    "website_id",
    "filters"
  ],
  "properties": {
    "website_id": {
      "type": "string",
      "format": "uuid",
      "description": "The website to list tracked content for."
    },
    "filters": {
      "allOf": [
        {
          "$ref": "#/$defs/ApiFilters"
        },
        {
          "type": "object",
          "properties": {
            "persona_ids": {
              "type": "array",
              "description": "Persona IDs to filter to (list them with GET /api/v1/personas). Omit for all personas.",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            "prompt_tags": {
              "type": "array",
              "description": "Prompt tag IDs to filter prompts by (list them with GET /api/v1/prompt-tags). An entry can also be `type:high_intent` (branded prompts) or `type:discovery` (non-branded prompts) to filter by prompt type. Omit for all tags.",
              "items": {
                "oneOf": [
                  {
                    "type": "string",
                    "format": "uuid"
                  },
                  {
                    "type": "string",
                    "enum": [
                      "type:discovery",
                      "type:high_intent"
                    ]
                  }
                ]
              }
            },
            "prompt_tags_operator": {
              "type": "string",
              "enum": [
                "is_any_of",
                "has_all_of"
              ],
              "description": "How the tag IDs in prompt_tags combine: is_any_of matches prompts with any listed tag, has_all_of only prompts carrying every listed tag. `type:` entries are not combined with the tags this way: a prompt must also have one of the listed types. Defaults to is_any_of."
            }
          }
        }
      ]
    },
    "content_type": {
      "type": "string",
      "enum": [
        "external",
        "imported",
        "manual",
        "athena_created",
        "draft",
        "snipe",
        "optimize",
        "slice"
      ],
      "description": "Restrict to a single content type. `manual` is user-authored content created directly in the editor (the Blank Editor flow). `athena_created` is a shortcut for the four Athena-generated subtypes (draft, snipe, optimize, slice). Omit to span every type. This endpoint lists tracked (published) content, so a draft-state row — `manual`, `draft`, `snipe`, `optimize`, or `slice` — appears only after it is published."
    },
    "sheet_id": {
      "type": "string",
      "format": "uuid",
      "description": "Restrict to content on a single Content Hub tab. Use `GET /api/v1/content/sheets` to discover IDs. A `sheet` tab lists its own content; a `view` tab, the default tab included, lists the shared main pool (content not filed in any sheet), without the view's saved filters. Omit to span every tab."
    },
    "mentioned": {
      "type": "boolean",
      "description": "If `true`, only count responses that mention your brand. If `false`, only count responses that do not. Omit to count every response."
    },
    "page_num": {
      "type": "integer",
      "minimum": 0,
      "default": 0,
      "description": "Zero-indexed page number."
    },
    "page_size": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "default": 50,
      "description": "Number of items per page (1–100)."
    }
  },
  "$defs": {
    "ApiFilters": {
      "type": "object",
      "description": "Filters for querying responses and metrics. Pass location filters in the JSON body as `filters.location_ids`.",
      "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"
        }
      }
    },
    "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"
        }
      ]
    }
  }
}