{
  "openapi": "3.1.0",
  "info": {
    "title": "Zaraftis Public API",
    "version": "1.0.0",
    "description": "Measure how brands appear in AI search answers. Requests and responses\nare JSON over https://api.zaraftis.com/v1, authenticated with a bearer\nAPI key, and paid work is charged in prepaid credits.\n"
  },
  "externalDocs": {
    "url": "https://docs.zaraftis.com/api"
  },
  "servers": [
    {
      "url": "https://api.zaraftis.com/v1"
    }
  ],
  "tags": [
    {
      "name": "identity",
      "x-displayName": "Identity"
    },
    {
      "name": "workspace",
      "x-displayName": "Workspace"
    },
    {
      "name": "brands",
      "x-displayName": "Brands"
    },
    {
      "name": "visibility-setups",
      "x-displayName": "Visibility setups"
    },
    {
      "name": "visibility",
      "x-displayName": "Visibility"
    },
    {
      "name": "scans",
      "x-displayName": "Scans"
    },
    {
      "name": "site-audits",
      "x-displayName": "Site audits"
    },
    {
      "name": "integration-snapshots",
      "x-displayName": "Integration snapshots"
    },
    {
      "name": "scan-reports",
      "x-displayName": "Scan reports"
    },
    {
      "name": "exports",
      "x-displayName": "Exports"
    },
    {
      "name": "tasks",
      "x-displayName": "Tasks"
    },
    {
      "name": "billing",
      "x-displayName": "Billing"
    },
    {
      "name": "third-party-connections",
      "x-displayName": "Third-party connections"
    },
    {
      "name": "schedules",
      "x-displayName": "Schedules"
    }
  ],
  "security": [
    {
      "apiKeyAuth": []
    },
    {
      "oauth": []
    }
  ],
  "paths": {
    "/commerce/catalog-imports": {
      "post": {
        "tags": [
          "commerce"
        ],
        "operationId": "createCommerceCatalogImports",
        "summary": "Import a catalog from CSV",
        "description": "Imports the customer's product catalog from inline CSV text. The shape is validated at ingress and one invalid row refuses the whole import with the exact row errors. A small import completes inline and returns the snapshot; a large one returns 202 with a task whose completion carries catalog_snapshot_id. The customer's catalog only; observed products never enter this path.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "csv": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000000
                  }
                },
                "required": [
                  "brand_id",
                  "csv"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The import completed inline (small file, or an identical re-import)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogImportResultEnvelope"
                }
              }
            }
          },
          "202": {
            "description": "The import was accepted as a durable task (large file)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogImportResultEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/commerce/catalog-snapshots/{catalog_snapshot_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/CatalogSnapshotId"
        }
      ],
      "get": {
        "tags": [
          "commerce"
        ],
        "operationId": "getCommerceCatalogSnapshot",
        "summary": "Get a catalog snapshot",
        "description": "Returns one immutable catalog snapshot's provenance: source, revision (the exact source bytes' sha256), schema version, validation result, and product count.",
        "responses": {
          "200": {
            "description": "One catalog snapshot",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogSnapshotEnvelope"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/commerce/products": {
      "get": {
        "tags": [
          "commerce"
        ],
        "operationId": "listCommerceProducts",
        "summary": "List catalog products",
        "description": "Returns the brand's current catalog view: the product rows of the latest accepted snapshot. The catalog is the customer-authoritative list and is distinct from observed products. Requires brand_id.",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageToken"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "One catalog product list page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogProductListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/commerce/products/{product_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/CatalogProductId"
        }
      ],
      "get": {
        "tags": [
          "commerce"
        ],
        "operationId": "getCommerceProduct",
        "summary": "Get a catalog product",
        "description": "Returns one catalog product's current state (the latest snapshot row for its stable identity).",
        "responses": {
          "200": {
            "description": "One catalog product",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogProductEnvelope"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/commerce/collections": {
      "post": {
        "tags": [
          "commerce"
        ],
        "operationId": "createCommerceCollections",
        "summary": "Run a commerce collection",
        "description": "Runs one paid commerce collection: the selected commerce queries on the resolved platforms in one country, collected through the collection partner. Every (query, platform) pair is one billable unit. Returns 202 with the collection, task, and billing references. A missing shopping module is evidence, never a failure.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "queries": {
                    "minItems": 1,
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 400
                    }
                  },
                  "platform_ids": {
                    "minItems": 1,
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    }
                  },
                  "country": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 2
                  }
                },
                "required": [
                  "brand_id",
                  "queries",
                  "platform_ids"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted collection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcceptedCommerceCollectionEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/commerce/collections/{collection_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/CommerceCollectionId"
        }
      ],
      "get": {
        "tags": [
          "commerce"
        ],
        "operationId": "getCommerceCollection",
        "summary": "Get a commerce collection",
        "description": "Returns one collection's state with its per-module observation counts. A zero count is real evidence of a module that did not appear (or a platform that served no shopping module), never a failure.",
        "responses": {
          "200": {
            "description": "One commerce collection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommerceCollectionEnvelope"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/commerce/observations": {
      "get": {
        "tags": [
          "commerce"
        ],
        "operationId": "listCommerceObservations",
        "summary": "List commerce observations",
        "description": "Returns the collected AI or search result modules. Filters: brand_id (required), collection_id, task_id, platform, module_type, and collected time windows. An observation is what an AI or search answer showed, which may be a competitor product, a hallucination, or an ambiguous title.",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageToken"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "One observation list page (compact: no evidence)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommerceObservationListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/commerce/observations/{commerce_observation_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/CommerceObservationId"
        }
      ],
      "get": {
        "tags": [
          "commerce"
        ],
        "operationId": "getCommerceObservation",
        "summary": "Get a commerce observation",
        "description": "Returns one observation. compact (default) omits the typed evidence; detailed adds the full per-module evidence exactly as collected.",
        "parameters": [
          {
            "$ref": "#/components/parameters/DetailParam"
          }
        ],
        "responses": {
          "200": {
            "description": "One observation; detailed adds evidence",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommerceObservationEnvelope"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/commerce/merchants": {
      "get": {
        "tags": [
          "commerce"
        ],
        "operationId": "listCommerceMerchants",
        "summary": "List merchants",
        "description": "Returns the merchant entities collected so far with their offer counts. A merchant is the seller or checkout destination, not the product brand. Requires brand_id.",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageToken"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "One merchant list page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MerchantListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/commerce/queries": {
      "get": {
        "tags": [
          "commerce"
        ],
        "operationId": "listCommerceQueries",
        "summary": "List commerce queries",
        "description": "Returns the brand's commerce query registry. These queries are distinct from the tracked user prompts a scan runs. Requires brand_id.",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageToken"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "One commerce query list page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommerceQueryListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/commerce/findings": {
      "get": {
        "tags": [
          "commerce"
        ],
        "operationId": "listCommerceFindings",
        "summary": "List commerce findings",
        "description": "Returns the commerce findings: factual conclusions produced by approved deterministic rules with exact evidence. Phase A registers no rule, so the list serves zero items; the shape exists so findings rules land without a contract change. Requires brand_id.",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageToken"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "One finding list page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FindingListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/commerce/findings/{finding_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/CommerceFindingId"
        }
      ],
      "get": {
        "tags": [
          "commerce"
        ],
        "operationId": "getCommerceFinding",
        "summary": "Get a commerce finding",
        "description": "Returns one commerce finding with its exact evidence.",
        "responses": {
          "200": {
            "description": "One commerce finding",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FindingEnvelope"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/tasks/{task_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/TaskId"
        }
      ],
      "get": {
        "tags": [
          "tasks"
        ],
        "operationId": "getTasks",
        "summary": "Get a task",
        "description": "Returns the status of asynchronous work and references to what it produced. Every accepted scan, check, site audit, scan report, export, and connection sync returns a task_id and task_url that point here. Poll until the task reaches a terminal status.",
        "responses": {
          "200": {
            "description": "Task status (the status values include partial)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskEnvelope"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/me": {
      "get": {
        "tags": [
          "identity"
        ],
        "operationId": "getMe",
        "summary": "Get the current credential",
        "description": "Returns the credential that made the request (never its secret) and its workspace.",
        "responses": {
          "200": {
            "description": "The credential and its workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/capabilities": {
      "get": {
        "tags": [
          "identity"
        ],
        "operationId": "getCapabilities",
        "summary": "List platforms, prices, and limits",
        "description": "Returns the AI platforms a scan can use, the credit price of each paid operation, and the request limits.",
        "responses": {
          "200": {
            "description": "Supported platforms, the credit catalog, and limits",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CapabilitiesEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/workspace": {
      "get": {
        "tags": [
          "workspace"
        ],
        "operationId": "getWorkspace",
        "summary": "Get the workspace",
        "description": "Returns the name and organization_id of the credential's workspace.",
        "responses": {
          "200": {
            "description": "Workspace identity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkspaceEnvelope"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/brands": {
      "post": {
        "tags": [
          "brands"
        ],
        "operationId": "createBrand",
        "summary": "Create a brand",
        "description": "Creates a brand and starts reading its website to fill in its details. Returns 201 with the brand. A credential limited to a brand allowlist cannot create brands. A brand with the same URL or name already in the workspace answers 409 with details.existing_brand ({ brand_id, name }) for that existing brand.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "country": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 2
                  },
                  "language": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 10
                  }
                },
                "required": [
                  "name",
                  "url",
                  "country",
                  "language"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created brand (public Brand shape in the success envelope)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrandEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          }
        }
      },
      "get": {
        "tags": [
          "brands"
        ],
        "operationId": "getBrands",
        "summary": "List brands",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageToken"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "One brand list page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrandListEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/brands/{brand_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/BrandId"
        }
      ],
      "get": {
        "tags": [
          "brands"
        ],
        "operationId": "getBrand",
        "summary": "Get a brand",
        "responses": {
          "200": {
            "description": "Exact brand (the public Brand shape)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrandEnvelope"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/brands/{brand_id}/topics": {
      "parameters": [
        {
          "$ref": "#/components/parameters/BrandId"
        }
      ],
      "get": {
        "tags": [
          "brands"
        ],
        "operationId": "listBrandTopics",
        "summary": "List a brand's topics",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageToken"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "One topic list page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrandTopicListEnvelope"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/brands/{brand_id}/prompts": {
      "parameters": [
        {
          "$ref": "#/components/parameters/BrandId"
        }
      ],
      "get": {
        "tags": [
          "brands"
        ],
        "operationId": "listBrandPrompts",
        "summary": "List a brand's prompts",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageToken"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "One prompt list page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrandPromptListEnvelope"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/brands/{brand_id}/competitors": {
      "parameters": [
        {
          "$ref": "#/components/parameters/BrandId"
        }
      ],
      "get": {
        "tags": [
          "brands"
        ],
        "operationId": "listBrandCompetitors",
        "summary": "List a brand's competitors",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageToken"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "One competitor list page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrandCompetitorListEnvelope"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/brands/{brand_id}/competitor-lists": {
      "parameters": [
        {
          "$ref": "#/components/parameters/BrandId"
        }
      ],
      "post": {
        "tags": [
          "brands"
        ],
        "operationId": "createCompetitorList",
        "summary": "Find a brand's competitors",
        "description": "Zaraftis researches the web for the brand's closest competitors in one market. It costs 90 credits (free for unlimited workspaces) and answers 202 with a task. When the task completes, its competitor_list_id names the list. The list is a proposal: save the competitors to track with PATCH /v1/visibility-setups/{setup_id}. A failed task releases the credits.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompetitorListCreateRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "The competitor list task was accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompetitorListAcceptedEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          }
        }
      }
    },
    "/scans/{scan_id}/competitor-suggestions": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ScanId"
        }
      ],
      "get": {
        "tags": [
          "scans"
        ],
        "operationId": "getCompetitorSuggestions",
        "summary": "Get a scan's competitor suggestions",
        "description": "Returns brands that at least two answers of the scan recommend for the same job as the brand, and that the scan did not track. Names the brand tracks now and rejected names are left out. To track a name, add it to the setup's competitors with PATCH /v1/visibility-setups/{setup_id}; a name with a null url needs its website first. To stop a name from being suggested, reject it with PATCH /v1/brands/{brand_id}/competitor-suggestions.",
        "responses": {
          "200": {
            "description": "The scan's competitor suggestions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompetitorSuggestionsEnvelope"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/brands/{brand_id}/competitor-suggestions": {
      "parameters": [
        {
          "$ref": "#/components/parameters/BrandId"
        }
      ],
      "patch": {
        "tags": [
          "brands"
        ],
        "operationId": "rejectCompetitorSuggestions",
        "summary": "Reject competitor suggestions",
        "description": "Saves names that are not competitors of the brand. A rejected name is left out of the suggestions of every scan of the brand. Sending a name again changes nothing. A rejected name can still be tracked by adding it to a setup.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompetitorSuggestionsPatchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The brand's rejected names",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RejectedCompetitorSuggestionsEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          }
        }
      }
    },
    "/competitor-lists/{competitor_list_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/CompetitorListId"
        }
      ],
      "get": {
        "tags": [
          "brands"
        ],
        "operationId": "getCompetitorList",
        "summary": "Get a competitor list",
        "description": "Returns up to 10 competitors, closest first, each with its website and the reason it was chosen. competitors is empty until the list is completed.",
        "responses": {
          "200": {
            "description": "One competitor list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompetitorListEnvelope"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/scans": {
      "post": {
        "tags": [
          "scans"
        ],
        "operationId": "createScans",
        "summary": "Start a scan",
        "description": "Starts a paid scan of the chosen prompts on the chosen platforms and returns 202 right away. The response carries the scan id, a status_url and task reference to poll, the requested query counts, and the billing object with the reserved credits.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScanCreateRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted scan",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          }
        }
      },
      "get": {
        "tags": [
          "scans"
        ],
        "operationId": "getScans",
        "summary": "List scans",
        "description": "Scan history for the workspace, newest first. Metrics come from GET /v1/scans/{scan_id}/metrics. Filter by brand_id, setup_id, status, and date range.",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageToken"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "One scan list page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScanListEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/scans/{scan_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ScanId"
        }
      ],
      "get": {
        "tags": [
          "scans"
        ],
        "operationId": "getScan",
        "summary": "Get a scan",
        "parameters": [
          {
            "$ref": "#/components/parameters/DetailParam"
          }
        ],
        "responses": {
          "200": {
            "description": "One scan (detailed adds started_at and error_message)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScanEnvelope"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/scans/{scan_id}/observations": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ScanId"
        }
      ],
      "get": {
        "tags": [
          "scans"
        ],
        "operationId": "listScanObservations",
        "summary": "List a scan's observations",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageToken"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "One observation list page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObservationListEnvelope"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/observations/{observation_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ObservationId"
        }
      ],
      "get": {
        "tags": [
          "scans"
        ],
        "operationId": "getObservations",
        "summary": "Get an observation",
        "parameters": [
          {
            "$ref": "#/components/parameters/DetailParam"
          }
        ],
        "responses": {
          "200": {
            "description": "One observation (compact; detail=detailed adds the answer body and citations)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObservationEnvelope"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/scans/{scan_id}/citations": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ScanId"
        }
      ],
      "get": {
        "tags": [
          "scans"
        ],
        "operationId": "listScanCitations",
        "summary": "List a scan's citations",
        "description": "Returns each page the scan's AI answers cited. Rows added between pages can shift a page.",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageToken"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "One citation list page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CitationListEnvelope"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/scans/{scan_id}/metrics": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ScanId"
        }
      ],
      "get": {
        "tags": [
          "scans"
        ],
        "operationId": "getScanMetrics",
        "summary": "Get a scan's metrics",
        "parameters": [
          {
            "$ref": "#/components/parameters/DetailParam"
          }
        ],
        "responses": {
          "200": {
            "description": "The scan's metrics (detailed adds per-platform and per-topic splits)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScanMetricsEnvelope"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/billing/wallet": {
      "get": {
        "tags": [
          "billing"
        ],
        "operationId": "getBillingWallet",
        "summary": "Get the wallet",
        "description": "Returns the workspace's credit balance and wallet state. A workspace with no credits yet reads as not activated. Needs the billing:read scope.",
        "responses": {
          "200": {
            "description": "The wallet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletEnvelope"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "billing"
        ],
        "operationId": "patchBillingWallet",
        "summary": "Update auto-reload settings",
        "description": "Changes the wallet's auto-reload settings. Needs the billing:write scope.",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WalletAutoReloadConfig"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The wallet after the change",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          }
        }
      }
    },
    "/billing/wallet-history": {
      "get": {
        "tags": [
          "billing"
        ],
        "operationId": "getWalletHistory",
        "summary": "List wallet history",
        "description": "The wallet's credit history, newest first. Each entry has a wh_ id, a label, the change to credits and reserved credits, the balance after, and references to the paid operation or payment. Needs the billing:read scope.",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageToken"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "One wallet-history page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletHistoryListEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/third-party-connections": {
      "get": {
        "tags": [
          "third-party-connections"
        ],
        "operationId": "getThirdPartyConnection",
        "summary": "List third-party connections",
        "description": "Each connection's provider, brand, state (active or needs_reauth), connected properties, and last sync time.",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageToken"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "One connection list page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          }
        }
      }
    },
    "/third-party-connections/{third_party_connection_id}:sync": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ThirdPartyConnectionId"
        }
      ],
      "post": {
        "tags": [
          "third-party-connections"
        ],
        "operationId": "syncThirdPartyConnection",
        "summary": "Sync a third-party connection",
        "description": "Pulls fresh reports from the connected Google Search Console and GA4 properties and stores them as snapshots. Returns 202 with a task; the finished task lists the integration_snapshot_ids. If the Google sign-in expired, the task fails with connection_needs_reauth.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted sync",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionSyncEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/site-audits": {
      "post": {
        "tags": [
          "site-audits"
        ],
        "operationId": "createSiteaudits",
        "summary": "Start a site audit",
        "description": "Starts a paid audit of the brand's URL. It checks that one page plus the site's robots.txt and sitemap files. Returns 202 with the audit, task, and billing references. Read the result at GET /v1/site-audits/{audit_id} when the task finishes.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "brand_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted audit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcceptedSiteAuditEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        }
      },
      "get": {
        "tags": [
          "site-audits"
        ],
        "operationId": "listSiteAudits",
        "summary": "List site audits",
        "description": "The workspace's site audits. Filter by brand_id, status, and created date.",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageToken"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "One site audit list page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteAuditListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          }
        }
      }
    },
    "/site-audits/{audit_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/AuditId"
        }
      ],
      "get": {
        "tags": [
          "site-audits"
        ],
        "operationId": "getSiteAudit",
        "summary": "Get a site audit",
        "description": "Returns one audit: request, brand, status, and timestamps, the collected data (the page with its response, preview, and rendering, robots_txt, sitemap candidates, and mobile Lighthouse), and the issues found from it. Each collected item says whether collection failed, so a failed fetch is never reported as a missing resource.",
        "responses": {
          "200": {
            "description": "One site audit with its data and issues",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SiteAuditEnvelope"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/scan-reports": {
      "post": {
        "tags": [
          "scan-reports"
        ],
        "operationId": "createScanreports",
        "summary": "Create a scan report",
        "description": "Creates a report from a finished scan and the sources you name. The report does not change later. Returns 202 with a task; the finished task gives the report_id. An unknown source id answers 404. A source from another brand, or with no usable result, answers 422 incomplete_evidence with details.unavailable_source_ids. A baseline whose scan is not earlier answers 409. The same selection again returns the existing report.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "scan_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "audit_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "gsc_snapshot_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "ga4_snapshot_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "baseline_report_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  }
                },
                "required": [
                  "scan_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted report",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcceptedScanReportEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          }
        }
      },
      "get": {
        "tags": [
          "scan-reports"
        ],
        "operationId": "listScanReports",
        "summary": "List scan reports",
        "description": "The workspace's scan reports. Filter by scan_id, brand_id, and created date.",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageToken"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "One scan report list page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScanReportListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          }
        }
      }
    },
    "/scan-reports/{report_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ReportId"
        }
      ],
      "get": {
        "tags": [
          "scan-reports"
        ],
        "operationId": "getScanReport",
        "summary": "Get a scan report",
        "description": "Returns the report in the view you ask for: summary (default) has the metrics, the findings summary, and the sources; evidence adds the observations; full returns the complete report.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ReportDetailParam"
          }
        ],
        "responses": {
          "200": {
            "description": "The report in the requested view",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportDetailEnvelope"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/exports": {
      "post": {
        "tags": [
          "exports"
        ],
        "operationId": "createExports",
        "summary": "Create an export",
        "description": "Writes a scan report to a JSON or JSONL file in the background. Returns 202 with the task and export references. Read the file details at GET /v1/exports/{export_id} and download it from GET /v1/exports/{export_id}/download.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExportCreateRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted export",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcceptedExportEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          }
        }
      },
      "get": {
        "tags": [
          "exports"
        ],
        "operationId": "getExports",
        "summary": "List exports",
        "description": "Each export's report, format, state (pending, completed, failed, or expired), and file details once completed. Filter by report_id and status.",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageToken"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "One export list page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          }
        }
      }
    },
    "/exports/{export_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ExportId"
        }
      ],
      "get": {
        "tags": [
          "exports"
        ],
        "operationId": "listExports",
        "summary": "Get an export",
        "description": "Returns the export's status and, once completed, its byte size, record count, checksum, and expiry. Files expire after 7 days.",
        "responses": {
          "200": {
            "description": "One export",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportEnvelope"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/exports/{export_id}/download": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ExportId"
        }
      ],
      "get": {
        "tags": [
          "exports"
        ],
        "operationId": "downloadExport",
        "summary": "Get an export download URL",
        "description": "Returns a short-lived URL for the stored export file. An expired export answers 404. Ask again for a new URL when it expires.",
        "responses": {
          "200": {
            "description": "One short-lived download URL",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportDownloadEnvelope"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/integration-snapshots/{snapshot_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/SnapshotId"
        }
      ],
      "get": {
        "tags": [
          "integration-snapshots"
        ],
        "operationId": "getIntegrationSnapshot",
        "summary": "Get an integration snapshot",
        "description": "Returns one Google Search Console or GA4 snapshot. A snapshot does not change: the same id always returns the same data. Each totals and rows member says whether the provider returned all of it.",
        "parameters": [
          {
            "$ref": "#/components/parameters/DetailParam"
          }
        ],
        "responses": {
          "200": {
            "description": "One snapshot",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IntegrationSnapshotEnvelope"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/schedules": {
      "post": {
        "tags": [
          "schedules"
        ],
        "operationId": "createSchedules",
        "summary": "Create a schedule",
        "description": "Runs a setup's scan on a repeating schedule. The wallet needs auto-reload turned on (402 otherwise). A setup can have one active schedule; a second answers 409. Responses give the next run in UTC. Across daylight saving changes, a missing local time runs at the next valid time and a repeated one runs once. A monthly schedule on a day the month lacks runs on its last day.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created schedule with its UTC next occurrence",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          }
        }
      },
      "get": {
        "tags": [
          "schedules"
        ],
        "operationId": "getSchedule",
        "summary": "List schedules",
        "description": "Each schedule's setup, brand, frequency, local time, status (active or paused), and next run in UTC. Filter by setup_id, brand_id, and status.",
        "parameters": [
          {
            "$ref": "#/components/parameters/PageToken"
          },
          {
            "$ref": "#/components/parameters/Limit"
          }
        ],
        "responses": {
          "200": {
            "description": "One schedule list page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleListEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          }
        }
      }
    },
    "/schedules/{schedule_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/ScheduleId"
        }
      ],
      "get": {
        "tags": [
          "schedules"
        ],
        "operationId": "listSchedules",
        "summary": "Get a schedule",
        "responses": {
          "200": {
            "description": "One schedule",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleEnvelope"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      },
      "patch": {
        "tags": [
          "schedules"
        ],
        "operationId": "patchSchedules",
        "summary": "Update a schedule",
        "description": "Send only the fields to change. Setting status back to active checks auto-reload again (402 otherwise).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The schedule after the update",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      },
      "delete": {
        "tags": [
          "schedules"
        ],
        "operationId": "deleteSchedules",
        "summary": "Delete a schedule",
        "description": "Needs { \"confirm\": true } in the body. Stops all future scheduled scans. The setup and past scans stay.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleDeleteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The deleted schedule",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleDeletedEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      }
    },
    "/visibility-setups": {
      "post": {
        "tags": [
          "visibility-setups"
        ],
        "operationId": "createVisibilitySetup",
        "summary": "Create a visibility setup",
        "description": "Saves the brand, prompts, platforms, and competitors that scans measure. The body needs creation_mode and exactly one of brand_id or new_brand. Manual saves the prompts you send, free, and answers 201. Auto has Zaraftis write 5 topics x 5 prompts for an existing brand_id in the setup's country and language: it costs 90 credits (free for unlimited workspaces), answers 202 with a task, and the task's setup_id names the saved setup when it completes. A failed Auto task releases the credits.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetupCreateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The saved setup",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetupCreatedEnvelope"
                }
              }
            }
          },
          "202": {
            "description": "The Auto setup task was accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetupGenerationAcceptedEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          }
        }
      }
    },
    "/visibility-setups/{setup_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/SetupId"
        }
      ],
      "get": {
        "tags": [
          "visibility-setups"
        ],
        "operationId": "getVisibilitySetup",
        "summary": "Get a visibility setup",
        "description": "Returns the setup's current version. An archived setup answers 404.",
        "responses": {
          "200": {
            "description": "The setup's current version",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetupEnvelope"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          }
        }
      },
      "patch": {
        "tags": [
          "visibility-setups"
        ],
        "operationId": "patchVisibilitySetup",
        "summary": "Update a visibility setup",
        "description": "Saves the edit as a new version. To change content, send country, language, platform_ids, and prompts together (topics and competitors are optional); they replace the old ones. A body with only name renames the setup. Past scans keep the version they used.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetupUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The saved setup after the edit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetupEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          }
        }
      },
      "delete": {
        "tags": [
          "visibility-setups"
        ],
        "operationId": "deleteVisibilitySetup",
        "summary": "Archive a visibility setup",
        "description": "Needs { \"confirm\": true } in the body. Archives the setup so scans can no longer use it and turns off its schedule. Past scans stay.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetupDeleteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The archived setup",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetupArchivedEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          }
        }
      }
    },
    "/visibility-setups/{setup_id}:copy": {
      "parameters": [
        {
          "$ref": "#/components/parameters/SetupId"
        }
      ],
      "post": {
        "tags": [
          "visibility-setups"
        ],
        "operationId": "copyVisibilitySetup",
        "summary": "Copy a visibility setup",
        "description": "Creates a new setup with the same brand, country, language, platforms, topics, prompts, and competitors. It does not start a scan. Send name to name the copy.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetupCopyRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The copy",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetupEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          }
        }
      }
    },
    "/visibility/checks": {
      "post": {
        "tags": [
          "visibility"
        ],
        "operationId": "createVisibilityChecks",
        "summary": "Run a visibility check",
        "description": "Measures one prompt on one or more platforms and waits for the answers. Returns 200 with the result when every query finishes within the sync deadline (checks_sync_deadline_seconds in GET /v1/capabilities). Otherwise returns 202 with the scan, task, and billing references while the work continues. Both carry task_id and task_url.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScanCreateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Completed check (response_detail detailed adds the observations)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VisibilityCheckEnvelope"
                }
              }
            }
          },
          "202": {
            "description": "Accepted check, still running",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcceptedScanEnvelope"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "API key sent as `Authorization: Bearer <key>`. A key belongs to one workspace, has scopes, and can be limited to some brands.\n"
      },
      "oauth": {
        "type": "oauth2",
        "description": "OAuth 2.1 sign-in (authorization code with PKCE) used by AI assistants that connect through the Zaraftis MCP server. Discovery URLs are at https://api.zaraftis.com/api/auth.\n",
        "flows": {}
      }
    },
    "parameters": {
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": true,
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        },
        "description": "A new value, such as a UUID, for each new request. Send the same value to retry a request safely; see https://docs.zaraftis.com/conventions#safe-retries-with-idempotency-key."
      },
      "PageToken": {
        "name": "page_token",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "The next_page_token from the previous page. Send it with the same filters and limit."
      },
      "Limit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 25
        },
        "description": "Items per page. A route can set a lower maximum or default; its own entry says so.\n"
      },
      "DetailParam": {
        "name": "detail",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "compact",
            "detailed"
          ]
        },
        "description": "compact (default) or detailed. Where a route returns more with detailed, its response description says what is added."
      },
      "ReportDetailParam": {
        "name": "detail",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "summary",
            "evidence",
            "full"
          ]
        },
        "description": "summary (default); evidence adds the observations, citations, and excerpts with their offsets; full returns the complete report.\n"
      },
      "WorkspaceDataExportId": {
        "name": "workspace_data_export_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "BrandId": {
        "name": "brand_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "SetupId": {
        "name": "setup_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "CompetitorListId": {
        "name": "competitor_list_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "ScanId": {
        "name": "scan_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "ObservationId": {
        "name": "observation_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "AuditId": {
        "name": "audit_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "SnapshotId": {
        "name": "snapshot_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "ReportId": {
        "name": "report_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "ExportId": {
        "name": "export_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "TaskId": {
        "name": "task_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "WalletHistoryId": {
        "name": "wallet_history_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "ThirdPartyConnectionId": {
        "name": "third_party_connection_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "ScheduleId": {
        "name": "schedule_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "SubscriptionId": {
        "name": "subscription_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "EventId": {
        "name": "event_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "CatalogProductId": {
        "name": "product_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "The stable catalog product identity (a 64-hex sha256, not a row id)."
      },
      "CatalogSnapshotId": {
        "name": "catalog_snapshot_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "CommerceCollectionId": {
        "name": "collection_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "CommerceObservationId": {
        "name": "commerce_observation_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      },
      "CommerceFindingId": {
        "name": "finding_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      }
    },
    "responses": {
      "Ok": {
        "description": "Success response with data and request_id.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SuccessEnvelope"
            }
          }
        }
      },
      "OkList": {
        "description": "Success response with items and pagination.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SuccessEnvelope"
            }
          }
        }
      },
      "Accepted": {
        "description": "Accepted: task reference, status URL, request_id, and billing object.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SuccessEnvelope"
            }
          }
        }
      },
      "Error400": {
        "description": "bad_request or validation_failed",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      },
      "Error401": {
        "description": "unauthorized",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      },
      "Error403": {
        "description": "forbidden: the key lacks a scope or role for this request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      },
      "Error402": {
        "description": "wallet_not_activated, insufficient_credits, or payment_action_required",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      },
      "Error404": {
        "description": "not_found: unknown id, or an id this key cannot see",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      },
      "Error405": {
        "description": "method_not_allowed: this action needs a person in the dashboard",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      },
      "Error409": {
        "description": "conflict, duplicate_url, or idempotency_conflict",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      },
      "Error422": {
        "description": "incomplete_evidence",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      },
      "Error429": {
        "description": "rate_limited: wait the Retry-After seconds",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      },
      "Error503": {
        "description": "capacity_unavailable, spending_temporarily_unavailable, or reconciliation_pending",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      },
      "Error501": {
        "description": "not_implemented: this option is not available yet",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      }
    },
    "schemas": {
      "RequestId": {
        "type": "string"
      },
      "SuccessEnvelope": {
        "type": "object",
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "type": "object",
            "additionalProperties": true
          },
          "request_id": {
            "$ref": "#/components/schemas/RequestId"
          }
        }
      },
      "ErrorEnvelope": {
        "type": "object",
        "required": [
          "success",
          "error",
          "request_id"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "const": false
          },
          "error": {
            "type": "object",
            "required": [
              "code",
              "message",
              "retryable"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "retryable": {
                "type": "boolean"
              },
              "details": {
                "type": "object",
                "additionalProperties": true
              },
              "field_errors": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "field",
                    "code",
                    "message"
                  ],
                  "properties": {
                    "field": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "enum": [
                        "required",
                        "format",
                        "too_small",
                        "too_large",
                        "unrecognized_key",
                        "invalid"
                      ]
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "request_id": {
            "$ref": "#/components/schemas/RequestId"
          }
        }
      },
      "CatalogImportResultEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/CatalogImportResult"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "CatalogSnapshotEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/CatalogSnapshotObject"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "CatalogProductListEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/CatalogProductListPage"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "CatalogProductEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/CatalogProductObject"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "AcceptedCommerceCollectionEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/AcceptedCommerceCollectionObject"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "CommerceCollectionEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/CommerceCollectionObject"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "CommerceObservationListEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/ObservationListPage"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "CommerceObservationEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/ObservationDetail"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "CommerceObservationCompactEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/ObservationListItem"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "MerchantListEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/MerchantListPage"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "CommerceQueryListEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/CommerceQueryListPage"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "FindingListEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/FindingListPage"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "FindingEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/CommerceFinding"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "TaskEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/TaskObject"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "MeEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/MeObject"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "CapabilitiesEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/CapabilitiesObject"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "WorkspaceEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/WorkspaceObject"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "ScanListEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/ScanListPage"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "ScanEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/ScanDetail"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "ObservationListEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/ObservationListPage"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "ObservationEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ObservationItem"
              },
              {
                "$ref": "#/components/schemas/ObservationDetail"
              }
            ]
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "CitationListEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/CitationListPage"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "ScanMetricsEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/ScanMetricsObject"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "AcceptedScanEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/AcceptedScanObject"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "VisibilityCheckEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/VisibilityCheckObject"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "SetupEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/SetupObject"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "SetupCreatedEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/SetupCreatedObject"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "SetupGenerationAcceptedEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/SetupGenerationAcceptedObject"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "CompetitorListAcceptedEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/CompetitorListAcceptedObject"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "CompetitorListEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/CompetitorListObject"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "CompetitorSuggestionsEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/CompetitorSuggestionsObject"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "RejectedCompetitorSuggestionsEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/RejectedCompetitorSuggestionsObject"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "SetupArchivedEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/SetupArchivedObject"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "BrandEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/BrandObject"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "BrandListEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/BrandListPage"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "BrandTopicListEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/BrandTopicListPage"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "BrandPromptListEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/BrandPromptListPage"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "BrandCompetitorListEnvelope": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "const": true
          },
          "data": {
            "$ref": "#/components/schemas/BrandCompetitorListPage"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "success",
          "data",
          "request_id"
        ],
        "additionalProperties": false
      },
      "CatalogImportResult": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/AcceptedCatalogImportObject"
          },
          {
            "$ref": "#/components/schemas/CompletedCatalogImportObject"
          }
        ]
      },
      "AcceptedCatalogImportObject": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string",
            "const": "accepted"
          },
          "task_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "task_url": {
            "type": "string",
            "minLength": 1
          },
          "detail": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "mode",
          "task_id",
          "task_url",
          "detail"
        ],
        "additionalProperties": false
      },
      "CompletedCatalogImportObject": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string",
            "const": "completed"
          },
          "catalog_snapshot_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "catalog_snapshot_url": {
            "type": "string",
            "minLength": 1
          },
          "detail": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "mode",
          "catalog_snapshot_id",
          "catalog_snapshot_url",
          "detail"
        ],
        "additionalProperties": false
      },
      "CatalogSnapshotObject": {
        "type": "object",
        "properties": {
          "catalog_snapshot_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "brand_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "source": {
            "type": "string",
            "enum": [
              "csv",
              "shopify"
            ]
          },
          "revision": {
            "type": "string",
            "format": "starts_with",
            "pattern": "^sha256:.*"
          },
          "schema_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "validation": {
            "$ref": "#/components/schemas/CatalogValidation"
          },
          "feed_readiness": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FeedReadiness"
              },
              {
                "type": "null"
              }
            ]
          },
          "findings_evaluation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FindingsEvaluation"
              },
              {
                "type": "null"
              }
            ]
          },
          "product_count": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "collected_at": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          }
        },
        "required": [
          "catalog_snapshot_id",
          "brand_id",
          "source",
          "revision",
          "schema_version",
          "validation",
          "feed_readiness",
          "findings_evaluation",
          "product_count",
          "collected_at",
          "created_at"
        ],
        "additionalProperties": false
      },
      "CatalogValidation": {
        "type": "object",
        "properties": {
          "source_rows": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "accepted_rows": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "errors": {
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "row": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 9007199254740991
                },
                "field": {
                  "type": "string",
                  "minLength": 1
                },
                "message": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "row",
                "field",
                "message"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "source_rows",
          "accepted_rows",
          "errors"
        ],
        "additionalProperties": false
      },
      "FeedReadiness": {
        "type": "object",
        "properties": {
          "rule_version": {
            "type": "string",
            "minLength": 1
          },
          "checked_products": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "ready_products": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "issue_counts": {
            "type": "object",
            "propertyNames": {
              "type": "string",
              "minLength": 1
            },
            "additionalProperties": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "issues": {
            "maxItems": 500,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "product_id": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{64}$"
                },
                "field": {
                  "type": "string",
                  "minLength": 1
                },
                "code": {
                  "type": "string",
                  "minLength": 1
                },
                "severity": {
                  "type": "string",
                  "enum": [
                    "error",
                    "note"
                  ]
                }
              },
              "required": [
                "product_id",
                "field",
                "code",
                "severity"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "rule_version",
          "checked_products",
          "ready_products",
          "issue_counts",
          "issues"
        ],
        "additionalProperties": false
      },
      "FindingsEvaluation": {
        "type": "object",
        "properties": {
          "evaluation_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "rules": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "rule": {
                  "type": "string",
                  "minLength": 1
                },
                "rule_version": {
                  "type": "string",
                  "minLength": 1
                },
                "checked": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "fired": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "rule",
                "rule_version",
                "checked",
                "fired"
              ],
              "additionalProperties": false
            }
          },
          "created_at": {
            "type": "string"
          }
        },
        "required": [
          "evaluation_id",
          "rules",
          "created_at"
        ],
        "additionalProperties": false
      },
      "CatalogProductListPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CatalogProductObject"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/ListPagination"
          }
        },
        "required": [
          "items",
          "pagination"
        ],
        "additionalProperties": false
      },
      "CatalogProductObject": {
        "type": "object",
        "properties": {
          "product_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "snapshot_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "title": {
            "type": "string",
            "minLength": 1
          },
          "canonical_url": {
            "type": "string",
            "minLength": 1
          },
          "external_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "gtin": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "category_path": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "price_text": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "price_value": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "currency": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "availability": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "in_stock",
                  "out_of_stock",
                  "pre_order",
                  "backorder",
                  "unknown"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "images": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "variant_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "seller_name": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "item_group_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "variant_attributes": {
            "type": "object",
            "propertyNames": {
              "type": "string",
              "minLength": 1
            },
            "additionalProperties": {
              "type": "string",
              "minLength": 1
            }
          },
          "imported_at": {
            "type": "string"
          }
        },
        "required": [
          "product_id",
          "snapshot_id",
          "title",
          "canonical_url",
          "external_id",
          "gtin",
          "description",
          "category_path",
          "price_text",
          "price_value",
          "currency",
          "availability",
          "images",
          "variant_ids",
          "seller_name",
          "item_group_id",
          "variant_attributes",
          "imported_at"
        ],
        "additionalProperties": false
      },
      "ListPagination": {
        "type": "object",
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "next_page_token": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "has_more"
        ],
        "additionalProperties": false,
        "description": "next_page_token is present only when has_more is true."
      },
      "AcceptedCommerceCollectionObject": {
        "type": "object",
        "properties": {
          "collection_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "brand_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "status": {
            "type": "string",
            "const": "queued"
          },
          "task_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "task_url": {
            "type": "string",
            "minLength": 1
          },
          "collection_url": {
            "type": "string",
            "minLength": 1
          },
          "platform_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            }
          },
          "country": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2
          },
          "requested_query_count": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "billing": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BillingObject"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "collection_id",
          "brand_id",
          "status",
          "task_id",
          "task_url",
          "collection_url",
          "platform_ids",
          "country",
          "requested_query_count",
          "billing"
        ],
        "additionalProperties": false
      },
      "BillingObject": {
        "type": "object",
        "properties": {
          "operation": {
            "type": "string",
            "enum": [
              "ai_platform_query",
              "site_audit",
              "auto_visibility_setup",
              "commerce_collection",
              "competitor_generation"
            ]
          },
          "credit_catalog_version": {
            "type": "string",
            "minLength": 1
          },
          "quantity_requested": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "unit_credits": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "maximum_credits": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "reserved_credits": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "billing_status": {
            "type": "string",
            "enum": [
              "reserved",
              "deducted",
              "released"
            ]
          },
          "credits_deducted": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "credits_released": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "wallet_history_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "operation",
          "credit_catalog_version",
          "quantity_requested",
          "unit_credits",
          "maximum_credits",
          "reserved_credits",
          "billing_status",
          "wallet_history_id"
        ],
        "additionalProperties": false
      },
      "CommerceCollectionObject": {
        "type": "object",
        "properties": {
          "collection_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "brand_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "completed",
              "failed"
            ]
          },
          "task_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "task_url": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "platform_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            }
          },
          "country": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2
          },
          "queries": {
            "type": "object",
            "properties": {
              "requested": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "completed": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "failed": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "requested",
              "completed",
              "failed"
            ],
            "additionalProperties": false
          },
          "observation_counts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "module_type": {
                  "type": "string",
                  "enum": [
                    "shopping_card",
                    "inline_product",
                    "merchant_offer",
                    "entity",
                    "map_entry",
                    "local_pack",
                    "knowledge_graph",
                    "product_panel",
                    "people_are_saying",
                    "citation_pill",
                    "sponsored_commerce"
                  ]
                },
                "count": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "module_type",
                "count"
              ],
              "additionalProperties": false
            }
          },
          "error": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 1
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "code",
                  "message"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "findings_evaluation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FindingsEvaluation"
              },
              {
                "type": "null"
              }
            ]
          },
          "timestamps": {
            "type": "object",
            "properties": {
              "created_at": {
                "type": "string"
              },
              "started_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "completed_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "created_at",
              "started_at",
              "completed_at"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "collection_id",
          "brand_id",
          "status",
          "task_id",
          "task_url",
          "platform_ids",
          "country",
          "queries",
          "observation_counts",
          "error",
          "findings_evaluation",
          "timestamps"
        ],
        "additionalProperties": false
      },
      "ObservationListPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ObservationItem"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/ListPagination"
          }
        },
        "required": [
          "items",
          "pagination"
        ],
        "additionalProperties": false
      },
      "ObservationListItem": {
        "type": "object",
        "properties": {
          "observation_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "collection_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "brand_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "platform": {
            "type": "string",
            "minLength": 1
          },
          "country": {
            "type": "string",
            "minLength": 1
          },
          "language": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "module_type": {
            "type": "string",
            "enum": [
              "shopping_card",
              "inline_product",
              "merchant_offer",
              "entity",
              "map_entry",
              "local_pack",
              "knowledge_graph",
              "product_panel",
              "people_are_saying",
              "citation_pill",
              "sponsored_commerce"
            ]
          },
          "position": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "collected_at": {
            "type": "string"
          }
        },
        "required": [
          "observation_id",
          "collection_id",
          "brand_id",
          "platform",
          "country",
          "language",
          "module_type",
          "position",
          "collected_at"
        ],
        "additionalProperties": false
      },
      "ObservationDetail": {
        "type": "object",
        "properties": {
          "observation_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "prompt_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "prompt_text": {
            "type": "string",
            "minLength": 1
          },
          "platform": {
            "type": "string",
            "minLength": 1
          },
          "country": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2
          },
          "language": {
            "type": "string",
            "minLength": 2,
            "maxLength": 10
          },
          "answer_type": {
            "type": "string",
            "enum": [
              "normal",
              "refusal"
            ]
          },
          "collected_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "brand": {
            "type": "object",
            "properties": {
              "mentioned": {
                "type": "boolean"
              },
              "cited": {
                "type": "boolean"
              },
              "mention_position": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "sentiment": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "mentioned",
              "cited",
              "mention_position",
              "sentiment"
            ],
            "additionalProperties": false
          },
          "mention_count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "citation_count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "mentions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BrandMentionItem"
            }
          },
          "answer_text": {
            "type": [
              "string",
              "null"
            ]
          },
          "citations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "minLength": 1
                },
                "domain": {
                  "type": "string",
                  "minLength": 1
                },
                "inline": {
                  "type": "boolean"
                },
                "position": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "url",
                "domain",
                "inline",
                "position"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "observation_id",
          "prompt_id",
          "prompt_text",
          "platform",
          "country",
          "language",
          "answer_type",
          "collected_at",
          "brand",
          "mention_count",
          "citation_count",
          "mentions",
          "answer_text",
          "citations"
        ],
        "additionalProperties": false
      },
      "MerchantListPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommerceMerchantListItem"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/ListPagination"
          }
        },
        "required": [
          "items",
          "pagination"
        ],
        "additionalProperties": false
      },
      "CommerceMerchantListItem": {
        "type": "object",
        "properties": {
          "merchant_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "domain": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "offer_count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "first_seen_at": {
            "type": "string"
          }
        },
        "required": [
          "merchant_id",
          "name",
          "domain",
          "offer_count",
          "first_seen_at"
        ],
        "additionalProperties": false
      },
      "CommerceQueryListPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommerceQueryListItem"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/ListPagination"
          }
        },
        "required": [
          "items",
          "pagination"
        ],
        "additionalProperties": false
      },
      "CommerceQueryListItem": {
        "type": "object",
        "properties": {
          "query_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "brand_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "text": {
            "type": "string",
            "minLength": 1
          },
          "collection_count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "first_collected_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_collected_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "query_id",
          "brand_id",
          "text",
          "collection_count",
          "first_collected_at",
          "last_collected_at"
        ],
        "additionalProperties": false
      },
      "FindingListPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommerceFinding"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/ListPagination"
          }
        },
        "required": [
          "items",
          "pagination"
        ],
        "additionalProperties": false
      },
      "CommerceFinding": {
        "type": "object",
        "properties": {
          "finding_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "brand_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "evaluation_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "source": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "collection",
                  "catalog_snapshot"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "required": [
              "type",
              "id"
            ],
            "additionalProperties": false
          },
          "catalog_product_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "rule": {
            "type": "string",
            "minLength": 1
          },
          "rule_version": {
            "type": "string",
            "minLength": 1
          },
          "severity": {
            "type": "string",
            "enum": [
              "critical",
              "high",
              "medium",
              "low"
            ]
          },
          "evidence": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "created_at": {
            "type": "string"
          }
        },
        "required": [
          "finding_id",
          "brand_id",
          "evaluation_id",
          "source",
          "catalog_product_id",
          "rule",
          "rule_version",
          "severity",
          "evidence",
          "created_at"
        ],
        "additionalProperties": false
      },
      "TaskObject": {
        "type": "object",
        "properties": {
          "task_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "operation": {
            "type": "string",
            "enum": [
              "scan",
              "site_audit",
              "setup_generation",
              "report_creation",
              "export",
              "integration_sync",
              "catalog_import",
              "commerce_collection",
              "competitor_generation"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "completed",
              "partial",
              "failed",
              "cancelled"
            ]
          },
          "progress": {
            "type": "object",
            "properties": {
              "requested": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "completed": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "failed": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "requested",
              "completed",
              "failed"
            ],
            "additionalProperties": false
          },
          "error": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 1
                  },
                  "message": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "code",
                  "message"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "timestamps": {
            "type": "object",
            "properties": {
              "created_at": {
                "type": "string"
              },
              "started_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "completed_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "created_at",
              "started_at",
              "completed_at"
            ],
            "additionalProperties": false
          },
          "scan_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "scan_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "site_audit_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "site_audit_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "report_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "report_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "export_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "export_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "catalog_snapshot_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "catalog_snapshot_url": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "commerce_collection_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "commerce_collection_url": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "setup_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "setup_url": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "competitor_list_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "competitor_list_url": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "integration_snapshot_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          "integration_snapshot_urls": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "required": [
          "task_id",
          "operation",
          "status",
          "progress",
          "error",
          "timestamps",
          "scan_id",
          "scan_url",
          "site_audit_id",
          "site_audit_url",
          "report_id",
          "report_url",
          "export_id",
          "export_url",
          "catalog_snapshot_id",
          "catalog_snapshot_url",
          "commerce_collection_id",
          "commerce_collection_url",
          "setup_id",
          "setup_url",
          "competitor_list_id",
          "competitor_list_url",
          "integration_snapshot_ids",
          "integration_snapshot_urls"
        ],
        "additionalProperties": false,
        "description": "Each task fills in only the references for what it made, such as scan_id and scan_url for a scan."
      },
      "MeObject": {
        "type": "object",
        "properties": {
          "credential": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "api_key",
                  "service_account"
                ]
              },
              "name": {
                "type": "string",
                "minLength": 1
              },
              "scopes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "brands:read",
                    "brands:write",
                    "setups:read",
                    "setups:write",
                    "scans:read",
                    "scans:write",
                    "audits:read",
                    "audits:write",
                    "scan-reports:read",
                    "scan-reports:write",
                    "commerce:read",
                    "commerce:write",
                    "integrations:read",
                    "integrations:write",
                    "exports:read",
                    "exports:write",
                    "schedules:read",
                    "schedules:write",
                    "webhooks:read",
                    "webhooks:write",
                    "billing:read",
                    "billing:write",
                    "billing:spend"
                  ]
                }
              },
              "brand_allowlist": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                }
              }
            },
            "required": [
              "id",
              "kind",
              "name",
              "scopes",
              "brand_allowlist"
            ],
            "additionalProperties": false
          },
          "workspace": {
            "type": "object",
            "properties": {
              "organization_id": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "organization_id"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "credential",
          "workspace"
        ],
        "additionalProperties": false
      },
      "CapabilitiesObject": {
        "type": "object",
        "properties": {
          "capabilities_schema_version": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "matrix_version": {
            "type": "string",
            "minLength": 1
          },
          "workspace_organization_id": {
            "type": "string",
            "minLength": 1
          },
          "platforms": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "platform_id": {
                  "type": "string",
                  "minLength": 1
                },
                "status": {
                  "type": "string",
                  "const": "available"
                },
                "countries": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "languages": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              },
              "required": [
                "platform_id",
                "status",
                "countries",
                "languages"
              ],
              "additionalProperties": false
            }
          },
          "operations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1
                },
                "unit_credits": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "notes": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "name",
                "unit_credits",
                "notes"
              ],
              "additionalProperties": false
            }
          },
          "limits": {
            "type": "object",
            "properties": {
              "max_prompts_per_scan": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "max_queries_per_scan": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "max_tracked_competitors_per_comparison": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "checks_sync_deadline_seconds": {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              "concurrent_work": {
                "type": "object",
                "properties": {
                  "scans": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  },
                  "active_queries": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "scans",
                  "active_queries"
                ],
                "additionalProperties": false
              },
              "note": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "max_prompts_per_scan",
              "max_queries_per_scan",
              "max_tracked_competitors_per_comparison",
              "checks_sync_deadline_seconds",
              "concurrent_work",
              "note"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "capabilities_schema_version",
          "matrix_version",
          "workspace_organization_id",
          "platforms",
          "operations",
          "limits"
        ],
        "additionalProperties": false
      },
      "WorkspaceObject": {
        "type": "object",
        "properties": {
          "organization_id": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "organization_id",
          "name"
        ],
        "additionalProperties": false
      },
      "ScanListPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ScanItem"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/ListPagination"
          }
        },
        "required": [
          "items",
          "pagination"
        ],
        "additionalProperties": false
      },
      "ScanItem": {
        "type": "object",
        "properties": {
          "scan_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "brand_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "brand_name": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "completed",
              "failed"
            ]
          },
          "triggered_by": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "country": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2
          },
          "language": {
            "type": "string",
            "minLength": 2,
            "maxLength": 10
          },
          "platforms": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "prompt_count": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "requested": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "completed": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "failed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "setup_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "setup_version_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "setup_checksum": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "scan_id",
          "brand_id",
          "brand_name",
          "status",
          "triggered_by",
          "created_at",
          "completed_at",
          "country",
          "language",
          "platforms",
          "prompt_count",
          "requested",
          "completed",
          "failed",
          "setup_id",
          "setup_version_id",
          "setup_checksum"
        ],
        "additionalProperties": false
      },
      "ScanDetail": {
        "type": "object",
        "properties": {
          "scan_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "brand_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "brand_name": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "completed",
              "failed"
            ]
          },
          "triggered_by": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "country": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2
          },
          "language": {
            "type": "string",
            "minLength": 2,
            "maxLength": 10
          },
          "platforms": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "prompt_count": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "requested": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "completed": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "failed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "setup_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "setup_version_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "setup_checksum": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "error_message": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "scan_id",
          "brand_id",
          "brand_name",
          "status",
          "triggered_by",
          "created_at",
          "completed_at",
          "country",
          "language",
          "platforms",
          "prompt_count",
          "requested",
          "completed",
          "failed",
          "setup_id",
          "setup_version_id",
          "setup_checksum",
          "started_at",
          "error_message"
        ],
        "additionalProperties": false
      },
      "ObservationItem": {
        "type": "object",
        "properties": {
          "observation_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "prompt_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "prompt_text": {
            "type": "string",
            "minLength": 1
          },
          "platform": {
            "type": "string",
            "minLength": 1
          },
          "country": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2
          },
          "language": {
            "type": "string",
            "minLength": 2,
            "maxLength": 10
          },
          "answer_type": {
            "type": "string",
            "enum": [
              "normal",
              "refusal"
            ]
          },
          "collected_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "brand": {
            "type": "object",
            "properties": {
              "mentioned": {
                "type": "boolean"
              },
              "cited": {
                "type": "boolean"
              },
              "mention_position": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "sentiment": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "mentioned",
              "cited",
              "mention_position",
              "sentiment"
            ],
            "additionalProperties": false
          },
          "mention_count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "citation_count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "mentions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BrandMentionItem"
            }
          }
        },
        "required": [
          "observation_id",
          "prompt_id",
          "prompt_text",
          "platform",
          "country",
          "language",
          "answer_type",
          "collected_at",
          "brand",
          "mention_count",
          "citation_count",
          "mentions"
        ],
        "additionalProperties": false
      },
      "BrandMentionItem": {
        "type": "object",
        "properties": {
          "name_in_answer": {
            "type": "string",
            "minLength": 1
          },
          "brand_name": {
            "type": "string",
            "minLength": 1
          },
          "brand_type": {
            "type": "string",
            "minLength": 1
          },
          "url_in_answer": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "name_in_answer",
          "brand_name",
          "brand_type",
          "url_in_answer"
        ],
        "additionalProperties": false
      },
      "CitationListPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlatCitationItem"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/ListPagination"
          }
        },
        "required": [
          "items",
          "pagination"
        ],
        "additionalProperties": false
      },
      "FlatCitationItem": {
        "type": "object",
        "properties": {
          "observation_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "url": {
            "type": "string",
            "minLength": 1
          },
          "domain": {
            "type": "string",
            "minLength": 1
          },
          "inline": {
            "type": "boolean"
          },
          "position": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "observation_id",
          "url",
          "domain",
          "inline",
          "position"
        ],
        "additionalProperties": false
      },
      "ScanMetricsObject": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/ReportMetricsCompact"
          },
          {
            "type": "object",
            "properties": {
              "answers_received": {
                "type": "object",
                "properties": {
                  "value": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "completeness": {
                    "type": "string",
                    "enum": [
                      "complete",
                      "partial",
                      "pending",
                      "empty"
                    ],
                    "description": "complete: the scan finished, every query got an answer, and the value is final. partial: the scan finished, but some queries got no answer (an error, an empty answer or a cancelled query), so the value counts fewer answers than asked. pending: the scan is still running, so there is no value yet. empty: the scan finished and there was nothing to count, so the value is null."
                  },
                  "completed_queries": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "requested_queries": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "by_platform": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "completed_queries": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "requested_queries": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "value",
                        "completed_queries",
                        "requested_queries"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "value",
                  "completeness",
                  "completed_queries",
                  "requested_queries",
                  "by_platform"
                ],
                "additionalProperties": false,
                "description": "Share of the queries asked (prompts x platforms) that got an answer."
              },
              "brand_mention_rate": {
                "type": "object",
                "properties": {
                  "value": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "completeness": {
                    "type": "string",
                    "enum": [
                      "complete",
                      "partial",
                      "pending",
                      "empty"
                    ],
                    "description": "complete: the scan finished, every query got an answer, and the value is final. partial: the scan finished, but some queries got no answer (an error, an empty answer or a cancelled query), so the value counts fewer answers than asked. pending: the scan is still running, so there is no value yet. empty: the scan finished and there was nothing to count, so the value is null."
                  },
                  "answers_analyzed": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "answers_mentioning_brand": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "by_platform": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "answers_analyzed": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "answers_mentioning_brand": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "value",
                        "answers_analyzed",
                        "answers_mentioning_brand"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "by_topic": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "answers_analyzed": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "answers_mentioning_brand": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "value",
                        "answers_analyzed",
                        "answers_mentioning_brand"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "value",
                  "completeness",
                  "answers_analyzed",
                  "answers_mentioning_brand",
                  "by_platform",
                  "by_topic"
                ],
                "additionalProperties": false,
                "description": "Share of answers that recommend your brand."
              },
              "brand_mention_rates": {
                "type": "object",
                "properties": {
                  "value": {
                    "anyOf": [
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "object",
                          "properties": {
                            "brand_type": {
                              "type": "string",
                              "enum": [
                                "user_brand",
                                "tracked_competitor",
                                "discovered_competitor"
                              ]
                            },
                            "configured_competitor_id": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "format": "uuid",
                                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "value": {
                              "anyOf": [
                                {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "answers_mentioning_brand": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "brand_type",
                            "configured_competitor_id",
                            "value",
                            "answers_mentioning_brand"
                          ],
                          "additionalProperties": false
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "completeness": {
                    "type": "string",
                    "enum": [
                      "complete",
                      "partial",
                      "pending",
                      "empty"
                    ],
                    "description": "complete: the scan finished, every query got an answer, and the value is final. partial: the scan finished, but some queries got no answer (an error, an empty answer or a cancelled query), so the value counts fewer answers than asked. pending: the scan is still running, so there is no value yet. empty: the scan finished and there was nothing to count, so the value is null."
                  },
                  "answers_analyzed": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "by_platform": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "answers_analyzed": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "brands": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "brand_type": {
                                "type": "string",
                                "enum": [
                                  "user_brand",
                                  "tracked_competitor",
                                  "discovered_competitor"
                                ]
                              },
                              "configured_competitor_id": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "value": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "answers_mentioning_brand": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "brand_type",
                              "configured_competitor_id",
                              "value",
                              "answers_mentioning_brand"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "answers_analyzed",
                        "brands"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "by_topic": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "answers_analyzed": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "brands": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "brand_type": {
                                "type": "string",
                                "enum": [
                                  "user_brand",
                                  "tracked_competitor",
                                  "discovered_competitor"
                                ]
                              },
                              "configured_competitor_id": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "value": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "answers_mentioning_brand": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "brand_type",
                              "configured_competitor_id",
                              "value",
                              "answers_mentioning_brand"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "answers_analyzed",
                        "brands"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "value",
                  "completeness",
                  "answers_analyzed",
                  "by_platform",
                  "by_topic"
                ],
                "additionalProperties": false,
                "description": "Share of answers that name each tracked brand."
              },
              "brand_citation_rate": {
                "type": "object",
                "properties": {
                  "value": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "completeness": {
                    "type": "string",
                    "enum": [
                      "complete",
                      "partial",
                      "pending",
                      "empty"
                    ],
                    "description": "complete: the scan finished, every query got an answer, and the value is final. partial: the scan finished, but some queries got no answer (an error, an empty answer or a cancelled query), so the value counts fewer answers than asked. pending: the scan is still running, so there is no value yet. empty: the scan finished and there was nothing to count, so the value is null."
                  },
                  "answers_analyzed": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "answers_citing_brand": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "by_platform": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "answers_analyzed": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "answers_citing_brand": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "value",
                        "answers_analyzed",
                        "answers_citing_brand"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "by_topic": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "answers_analyzed": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "answers_citing_brand": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "value",
                        "answers_analyzed",
                        "answers_citing_brand"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "value",
                  "completeness",
                  "answers_analyzed",
                  "answers_citing_brand",
                  "by_platform",
                  "by_topic"
                ],
                "additionalProperties": false,
                "description": "Share of answers that cite your brand's domain in the answer text."
              },
              "mention_position": {
                "type": "object",
                "properties": {
                  "value": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "completeness": {
                    "type": "string",
                    "enum": [
                      "complete",
                      "partial",
                      "pending",
                      "empty"
                    ],
                    "description": "complete: the scan finished, every query got an answer, and the value is final. partial: the scan finished, but some queries got no answer (an error, an empty answer or a cancelled query), so the value counts fewer answers than asked. pending: the scan is still running, so there is no value yet. empty: the scan finished and there was nothing to count, so the value is null."
                  },
                  "answers_with_position": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "distribution": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "brands": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "brand_type": {
                          "type": "string",
                          "enum": [
                            "user_brand",
                            "tracked_competitor",
                            "discovered_competitor"
                          ]
                        },
                        "configured_competitor_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "value": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "answers_with_position": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "distribution": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        }
                      },
                      "required": [
                        "brand_type",
                        "configured_competitor_id",
                        "value",
                        "answers_with_position",
                        "distribution"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "by_platform": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "answers_with_position": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "distribution": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "brands": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "brand_type": {
                                "type": "string",
                                "enum": [
                                  "user_brand",
                                  "tracked_competitor",
                                  "discovered_competitor"
                                ]
                              },
                              "configured_competitor_id": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "value": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "answers_with_position": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "distribution": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                }
                              }
                            },
                            "required": [
                              "brand_type",
                              "configured_competitor_id",
                              "value",
                              "answers_with_position",
                              "distribution"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "value",
                        "answers_with_position",
                        "distribution",
                        "brands"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "by_topic": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": [
                            "number",
                            "null"
                          ]
                        },
                        "answers_with_position": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "distribution": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "brands": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "brand_type": {
                                "type": "string",
                                "enum": [
                                  "user_brand",
                                  "tracked_competitor",
                                  "discovered_competitor"
                                ]
                              },
                              "configured_competitor_id": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "value": {
                                "type": [
                                  "number",
                                  "null"
                                ]
                              },
                              "answers_with_position": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "distribution": {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                }
                              }
                            },
                            "required": [
                              "brand_type",
                              "configured_competitor_id",
                              "value",
                              "answers_with_position",
                              "distribution"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "value",
                        "answers_with_position",
                        "distribution",
                        "brands"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "value",
                  "completeness",
                  "answers_with_position",
                  "distribution",
                  "brands",
                  "by_platform",
                  "by_topic"
                ],
                "additionalProperties": false,
                "description": "Your brand's average rank among the brands an answer names, where 1 means named first."
              },
              "share_of_voice": {
                "type": "object",
                "properties": {
                  "value": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "completeness": {
                    "type": "string",
                    "enum": [
                      "complete",
                      "partial",
                      "pending",
                      "empty"
                    ],
                    "description": "complete: the scan finished, every query got an answer, and the value is final. partial: the scan finished, but some queries got no answer (an error, an empty answer or a cancelled query), so the value counts fewer answers than asked. pending: the scan is still running, so there is no value yet. empty: the scan finished and there was nothing to count, so the value is null."
                  },
                  "brand_mentions": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "all_brand_mentions": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "other_brand_mentions": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "brands": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "brand_type": {
                          "type": "string",
                          "enum": [
                            "user_brand",
                            "tracked_competitor",
                            "discovered_competitor"
                          ]
                        },
                        "configured_competitor_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "value": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "mentions": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "brand_type",
                        "configured_competitor_id",
                        "value",
                        "mentions"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "by_platform": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "all_brand_mentions": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "other_brand_mentions": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "brands": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "brand_type": {
                                "type": "string",
                                "enum": [
                                  "user_brand",
                                  "tracked_competitor",
                                  "discovered_competitor"
                                ]
                              },
                              "configured_competitor_id": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "value": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "mentions": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "brand_type",
                              "configured_competitor_id",
                              "value",
                              "mentions"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "all_brand_mentions",
                        "brands"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "by_topic": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "all_brand_mentions": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "other_brand_mentions": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "brands": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "brand_type": {
                                "type": "string",
                                "enum": [
                                  "user_brand",
                                  "tracked_competitor",
                                  "discovered_competitor"
                                ]
                              },
                              "configured_competitor_id": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "format": "uuid",
                                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "value": {
                                "anyOf": [
                                  {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "mentions": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              }
                            },
                            "required": [
                              "brand_type",
                              "configured_competitor_id",
                              "value",
                              "mentions"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "all_brand_mentions",
                        "brands"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "value",
                  "completeness",
                  "brand_mentions",
                  "all_brand_mentions",
                  "brands",
                  "by_platform",
                  "by_topic"
                ],
                "additionalProperties": false,
                "description": "Answers that name your brand, divided by the total of answers that name each brand."
              },
              "brand_citation_share": {
                "type": "object",
                "properties": {
                  "value": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "completeness": {
                    "type": "string",
                    "enum": [
                      "complete",
                      "partial",
                      "pending",
                      "empty"
                    ],
                    "description": "complete: the scan finished, every query got an answer, and the value is final. partial: the scan finished, but some queries got no answer (an error, an empty answer or a cancelled query), so the value counts fewer answers than asked. pending: the scan is still running, so there is no value yet. empty: the scan finished and there was nothing to count, so the value is null."
                  },
                  "brand_citations": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "total_citations": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "by_platform": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "brand_citations": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "total_citations": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "value",
                        "brand_citations",
                        "total_citations"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "by_topic": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "brand_citations": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "total_citations": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "value",
                        "brand_citations",
                        "total_citations"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "value",
                  "completeness",
                  "brand_citations",
                  "total_citations",
                  "by_platform",
                  "by_topic"
                ],
                "additionalProperties": false,
                "description": "Share of the citations in answer text that point to your brand's domain."
              },
              "sentiment_breakdown": {
                "type": "object",
                "properties": {
                  "value": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "positive": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "neutral": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "negative": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "unclassified": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "positive",
                          "neutral",
                          "negative",
                          "unclassified"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "completeness": {
                    "type": "string",
                    "enum": [
                      "complete",
                      "partial",
                      "pending",
                      "empty"
                    ],
                    "description": "complete: the scan finished, every query got an answer, and the value is final. partial: the scan finished, but some queries got no answer (an error, an empty answer or a cancelled query), so the value counts fewer answers than asked. pending: the scan is still running, so there is no value yet. empty: the scan finished and there was nothing to count, so the value is null."
                  },
                  "by_platform": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "positive": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "neutral": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "negative": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "unclassified": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "positive",
                                "neutral",
                                "negative",
                                "unclassified"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "completeness": {
                          "type": "string",
                          "enum": [
                            "complete",
                            "partial",
                            "pending",
                            "empty"
                          ],
                          "description": "complete: the scan finished, every query got an answer, and the value is final. partial: the scan finished, but some queries got no answer (an error, an empty answer or a cancelled query), so the value counts fewer answers than asked. pending: the scan is still running, so there is no value yet. empty: the scan finished and there was nothing to count, so the value is null."
                        }
                      },
                      "required": [
                        "value",
                        "completeness"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "by_topic": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "positive": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "neutral": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "negative": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "unclassified": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "positive",
                                "neutral",
                                "negative",
                                "unclassified"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "completeness": {
                          "type": "string",
                          "enum": [
                            "complete",
                            "partial",
                            "pending",
                            "empty"
                          ],
                          "description": "complete: the scan finished, every query got an answer, and the value is final. partial: the scan finished, but some queries got no answer (an error, an empty answer or a cancelled query), so the value counts fewer answers than asked. pending: the scan is still running, so there is no value yet. empty: the scan finished and there was nothing to count, so the value is null."
                        }
                      },
                      "required": [
                        "value",
                        "completeness"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "value",
                  "completeness",
                  "by_platform",
                  "by_topic"
                ],
                "additionalProperties": false,
                "description": "Count of answers that mention your brand, by sentiment toward your brand; unclassified means the classifier was less than 80% sure."
              },
              "unique_cited_domains": {
                "type": "object",
                "properties": {
                  "value": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "completeness": {
                    "type": "string",
                    "enum": [
                      "complete",
                      "partial",
                      "pending",
                      "empty"
                    ],
                    "description": "complete: the scan finished, every query got an answer, and the value is final. partial: the scan finished, but some queries got no answer (an error, an empty answer or a cancelled query), so the value counts fewer answers than asked. pending: the scan is still running, so there is no value yet. empty: the scan finished and there was nothing to count, so the value is null."
                  },
                  "domains": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "citation_count": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "citation_share": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "citation_count",
                        "citation_share"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "source_classes": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "citation_count": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "citation_count"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "value",
                  "completeness",
                  "domains",
                  "source_classes"
                ],
                "additionalProperties": false,
                "description": "Number of distinct domains cited in answer text."
              },
              "coverage": {
                "type": "object",
                "properties": {
                  "value": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "by_platform": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "object",
                              "properties": {
                                "requested_queries": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "observations": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "requested_queries",
                                "observations"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "by_topic": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "object",
                              "properties": {
                                "requested_queries": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "observations": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "requested_queries",
                                "observations"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "by_prompt": {
                            "type": "object",
                            "propertyNames": {
                              "type": "string"
                            },
                            "additionalProperties": {
                              "type": "object",
                              "properties": {
                                "requested_queries": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "observations": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "requested_queries",
                                "observations"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "by_platform",
                          "by_topic",
                          "by_prompt"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "completeness": {
                    "type": "string",
                    "enum": [
                      "complete",
                      "partial",
                      "pending",
                      "empty"
                    ],
                    "description": "complete: the scan finished, every query got an answer, and the value is final. partial: the scan finished, but some queries got no answer (an error, an empty answer or a cancelled query), so the value counts fewer answers than asked. pending: the scan is still running, so there is no value yet. empty: the scan finished and there was nothing to count, so the value is null."
                  }
                },
                "required": [
                  "value",
                  "completeness"
                ],
                "additionalProperties": false,
                "description": "Queries asked and answers received on each platform."
              }
            },
            "required": [
              "answers_received",
              "brand_mention_rate",
              "brand_mention_rates",
              "brand_citation_rate",
              "mention_position",
              "share_of_voice",
              "brand_citation_share",
              "sentiment_breakdown",
              "unique_cited_domains",
              "coverage"
            ],
            "additionalProperties": false
          }
        ]
      },
      "ReportMetricsCompact": {
        "type": "object",
        "properties": {
          "answers_received": {
            "type": "object",
            "properties": {
              "value": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "completeness": {
                "type": "string",
                "enum": [
                  "complete",
                  "partial",
                  "pending",
                  "empty"
                ],
                "description": "complete: the scan finished, every query got an answer, and the value is final. partial: the scan finished, but some queries got no answer (an error, an empty answer or a cancelled query), so the value counts fewer answers than asked. pending: the scan is still running, so there is no value yet. empty: the scan finished and there was nothing to count, so the value is null."
              },
              "completed_queries": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "requested_queries": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "value",
              "completeness",
              "completed_queries",
              "requested_queries"
            ],
            "additionalProperties": false,
            "description": "Share of the queries asked (prompts x platforms) that got an answer."
          },
          "brand_mention_rate": {
            "type": "object",
            "properties": {
              "value": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "completeness": {
                "type": "string",
                "enum": [
                  "complete",
                  "partial",
                  "pending",
                  "empty"
                ],
                "description": "complete: the scan finished, every query got an answer, and the value is final. partial: the scan finished, but some queries got no answer (an error, an empty answer or a cancelled query), so the value counts fewer answers than asked. pending: the scan is still running, so there is no value yet. empty: the scan finished and there was nothing to count, so the value is null."
              },
              "answers_analyzed": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "answers_mentioning_brand": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "value",
              "completeness",
              "answers_analyzed",
              "answers_mentioning_brand"
            ],
            "additionalProperties": false,
            "description": "Share of answers that recommend your brand."
          },
          "brand_mention_rates": {
            "type": "object",
            "properties": {
              "value": {
                "anyOf": [
                  {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "brand_type": {
                          "type": "string",
                          "enum": [
                            "user_brand",
                            "tracked_competitor",
                            "discovered_competitor"
                          ]
                        },
                        "configured_competitor_id": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "value": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "answers_mentioning_brand": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "brand_type",
                        "configured_competitor_id",
                        "value",
                        "answers_mentioning_brand"
                      ],
                      "additionalProperties": false
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "completeness": {
                "type": "string",
                "enum": [
                  "complete",
                  "partial",
                  "pending",
                  "empty"
                ],
                "description": "complete: the scan finished, every query got an answer, and the value is final. partial: the scan finished, but some queries got no answer (an error, an empty answer or a cancelled query), so the value counts fewer answers than asked. pending: the scan is still running, so there is no value yet. empty: the scan finished and there was nothing to count, so the value is null."
              },
              "answers_analyzed": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "value",
              "completeness",
              "answers_analyzed"
            ],
            "additionalProperties": false,
            "description": "Share of answers that name each tracked brand."
          },
          "brand_citation_rate": {
            "type": "object",
            "properties": {
              "value": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "completeness": {
                "type": "string",
                "enum": [
                  "complete",
                  "partial",
                  "pending",
                  "empty"
                ],
                "description": "complete: the scan finished, every query got an answer, and the value is final. partial: the scan finished, but some queries got no answer (an error, an empty answer or a cancelled query), so the value counts fewer answers than asked. pending: the scan is still running, so there is no value yet. empty: the scan finished and there was nothing to count, so the value is null."
              },
              "answers_analyzed": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "answers_citing_brand": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "value",
              "completeness",
              "answers_analyzed",
              "answers_citing_brand"
            ],
            "additionalProperties": false,
            "description": "Share of answers that cite your brand's domain in the answer text."
          },
          "mention_position": {
            "type": "object",
            "properties": {
              "value": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "completeness": {
                "type": "string",
                "enum": [
                  "complete",
                  "partial",
                  "pending",
                  "empty"
                ],
                "description": "complete: the scan finished, every query got an answer, and the value is final. partial: the scan finished, but some queries got no answer (an error, an empty answer or a cancelled query), so the value counts fewer answers than asked. pending: the scan is still running, so there is no value yet. empty: the scan finished and there was nothing to count, so the value is null."
              },
              "answers_with_position": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "distribution": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "brands": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "brand_type": {
                      "type": "string",
                      "enum": [
                        "user_brand",
                        "tracked_competitor",
                        "discovered_competitor"
                      ]
                    },
                    "configured_competitor_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "value": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "answers_with_position": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "distribution": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    }
                  },
                  "required": [
                    "brand_type",
                    "configured_competitor_id",
                    "value",
                    "answers_with_position",
                    "distribution"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "value",
              "completeness",
              "answers_with_position",
              "distribution",
              "brands"
            ],
            "additionalProperties": false,
            "description": "Your brand's average rank among the brands an answer names, where 1 means named first."
          },
          "share_of_voice": {
            "type": "object",
            "properties": {
              "value": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "completeness": {
                "type": "string",
                "enum": [
                  "complete",
                  "partial",
                  "pending",
                  "empty"
                ],
                "description": "complete: the scan finished, every query got an answer, and the value is final. partial: the scan finished, but some queries got no answer (an error, an empty answer or a cancelled query), so the value counts fewer answers than asked. pending: the scan is still running, so there is no value yet. empty: the scan finished and there was nothing to count, so the value is null."
              },
              "brand_mentions": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "all_brand_mentions": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "other_brand_mentions": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "brands": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "brand_type": {
                      "type": "string",
                      "enum": [
                        "user_brand",
                        "tracked_competitor",
                        "discovered_competitor"
                      ]
                    },
                    "configured_competitor_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "value": {
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "mentions": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "brand_type",
                    "configured_competitor_id",
                    "value",
                    "mentions"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "value",
              "completeness",
              "brand_mentions",
              "all_brand_mentions",
              "brands"
            ],
            "additionalProperties": false,
            "description": "Answers that name your brand, divided by the total of answers that name each brand."
          },
          "brand_citation_share": {
            "type": "object",
            "properties": {
              "value": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "completeness": {
                "type": "string",
                "enum": [
                  "complete",
                  "partial",
                  "pending",
                  "empty"
                ],
                "description": "complete: the scan finished, every query got an answer, and the value is final. partial: the scan finished, but some queries got no answer (an error, an empty answer or a cancelled query), so the value counts fewer answers than asked. pending: the scan is still running, so there is no value yet. empty: the scan finished and there was nothing to count, so the value is null."
              },
              "brand_citations": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "total_citations": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "value",
              "completeness",
              "brand_citations",
              "total_citations"
            ],
            "additionalProperties": false,
            "description": "Share of the citations in answer text that point to your brand's domain."
          },
          "sentiment_breakdown": {
            "type": "object",
            "properties": {
              "value": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "positive": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "neutral": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "negative": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "unclassified": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "positive",
                      "neutral",
                      "negative",
                      "unclassified"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "completeness": {
                "type": "string",
                "enum": [
                  "complete",
                  "partial",
                  "pending",
                  "empty"
                ],
                "description": "complete: the scan finished, every query got an answer, and the value is final. partial: the scan finished, but some queries got no answer (an error, an empty answer or a cancelled query), so the value counts fewer answers than asked. pending: the scan is still running, so there is no value yet. empty: the scan finished and there was nothing to count, so the value is null."
              }
            },
            "required": [
              "value",
              "completeness"
            ],
            "additionalProperties": false,
            "description": "Count of answers that mention your brand, by sentiment toward your brand; unclassified means the classifier was less than 80% sure."
          },
          "unique_cited_domains": {
            "type": "object",
            "properties": {
              "value": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "completeness": {
                "type": "string",
                "enum": [
                  "complete",
                  "partial",
                  "pending",
                  "empty"
                ],
                "description": "complete: the scan finished, every query got an answer, and the value is final. partial: the scan finished, but some queries got no answer (an error, an empty answer or a cancelled query), so the value counts fewer answers than asked. pending: the scan is still running, so there is no value yet. empty: the scan finished and there was nothing to count, so the value is null."
              },
              "domains": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "citation_count": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "citation_share": {
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "citation_count",
                    "citation_share"
                  ],
                  "additionalProperties": false
                }
              },
              "source_classes": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "object",
                  "properties": {
                    "citation_count": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "citation_count"
                  ],
                  "additionalProperties": false
                }
              },
              "domains_total": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "value",
              "completeness",
              "domains",
              "source_classes",
              "domains_total"
            ],
            "additionalProperties": false,
            "description": "Number of distinct domains cited in answer text."
          },
          "coverage": {
            "type": "object",
            "properties": {
              "value": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "by_platform": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "object",
                          "properties": {
                            "requested_queries": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "observations": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            }
                          },
                          "required": [
                            "requested_queries",
                            "observations"
                          ],
                          "additionalProperties": false
                        }
                      }
                    },
                    "required": [
                      "by_platform"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "completeness": {
                "type": "string",
                "enum": [
                  "complete",
                  "partial",
                  "pending",
                  "empty"
                ],
                "description": "complete: the scan finished, every query got an answer, and the value is final. partial: the scan finished, but some queries got no answer (an error, an empty answer or a cancelled query), so the value counts fewer answers than asked. pending: the scan is still running, so there is no value yet. empty: the scan finished and there was nothing to count, so the value is null."
              }
            },
            "required": [
              "value",
              "completeness"
            ],
            "additionalProperties": false,
            "description": "Queries asked and answers received on each platform."
          }
        },
        "required": [
          "answers_received",
          "brand_mention_rate",
          "brand_mention_rates",
          "brand_citation_rate",
          "mention_position",
          "share_of_voice",
          "brand_citation_share",
          "sentiment_breakdown",
          "unique_cited_domains",
          "coverage"
        ],
        "additionalProperties": false
      },
      "AcceptedScanObject": {
        "type": "object",
        "properties": {
          "scan_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "brand_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "completed",
              "partial",
              "cancelled",
              "failed"
            ]
          },
          "status_url": {
            "type": "string",
            "minLength": 1
          },
          "task_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "task_url": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "setup": {
            "type": "object",
            "properties": {
              "setup_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "setup_version_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "setup_checksum": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "setup_id",
              "setup_version_id",
              "setup_checksum"
            ],
            "additionalProperties": false
          },
          "requested_query_count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "queries": {
            "type": "object",
            "properties": {
              "requested": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "completed": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "failed": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "skipped": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "requested",
              "completed",
              "failed",
              "skipped"
            ],
            "additionalProperties": false
          },
          "billing": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BillingObject"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "scan_id",
          "brand_id",
          "status",
          "status_url",
          "task_id",
          "task_url",
          "setup",
          "requested_query_count",
          "queries",
          "billing"
        ],
        "additionalProperties": false
      },
      "VisibilityCheckObject": {
        "type": "object",
        "properties": {
          "scan_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "brand_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "brand_name": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "completed",
              "failed"
            ]
          },
          "triggered_by": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "country": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2
          },
          "language": {
            "type": "string",
            "minLength": 2,
            "maxLength": 10
          },
          "platforms": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "prompt_count": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "requested": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "completed": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "failed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "setup_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "setup_version_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "setup_checksum": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "error_message": {
            "type": [
              "string",
              "null"
            ]
          },
          "task_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "task_url": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "billing": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BillingObject"
              },
              {
                "type": "null"
              }
            ]
          },
          "observations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ObservationItem"
            }
          }
        },
        "required": [
          "scan_id",
          "brand_id",
          "brand_name",
          "status",
          "triggered_by",
          "created_at",
          "completed_at",
          "country",
          "language",
          "platforms",
          "prompt_count",
          "requested",
          "completed",
          "failed",
          "setup_id",
          "setup_version_id",
          "setup_checksum",
          "started_at",
          "error_message",
          "task_id",
          "task_url",
          "billing"
        ],
        "additionalProperties": false
      },
      "SetupObject": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "brand": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "url": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "id",
              "url"
            ],
            "additionalProperties": false
          },
          "country": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2
          },
          "language": {
            "type": "string",
            "minLength": 2,
            "maxLength": 10
          },
          "creation_mode": {
            "type": "string",
            "enum": [
              "manual",
              "auto"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          },
          "setup_checksum": {
            "type": "string",
            "minLength": 1
          },
          "current_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "platforms": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "topics": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "title": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "id",
                "title"
              ],
              "additionalProperties": false
            }
          },
          "prompts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "text": {
                  "type": "string",
                  "minLength": 1
                },
                "topic_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "text",
                "topic_id"
              ],
              "additionalProperties": false
            }
          },
          "competitors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "name": {
                  "type": "string",
                  "minLength": 1
                },
                "url": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "id",
                "name",
                "url"
              ],
              "additionalProperties": false
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "name",
          "brand",
          "country",
          "language",
          "creation_mode",
          "status",
          "setup_checksum",
          "current_version",
          "platforms",
          "topics",
          "prompts",
          "competitors",
          "created_at"
        ],
        "additionalProperties": false
      },
      "SetupCreatedObject": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "brand": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "url": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "id",
              "url"
            ],
            "additionalProperties": false
          },
          "country": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2
          },
          "language": {
            "type": "string",
            "minLength": 2,
            "maxLength": 10
          },
          "creation_mode": {
            "type": "string",
            "enum": [
              "manual",
              "auto"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          },
          "setup_checksum": {
            "type": "string",
            "minLength": 1
          },
          "current_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "platforms": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "topics": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "title": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "id",
                "title"
              ],
              "additionalProperties": false
            }
          },
          "prompts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "text": {
                  "type": "string",
                  "minLength": 1
                },
                "topic_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "text",
                "topic_id"
              ],
              "additionalProperties": false
            }
          },
          "competitors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "name": {
                  "type": "string",
                  "minLength": 1
                },
                "url": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "id",
                "name",
                "url"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "id",
          "name",
          "brand",
          "country",
          "language",
          "creation_mode",
          "status",
          "setup_checksum",
          "current_version",
          "platforms",
          "topics",
          "prompts",
          "competitors"
        ],
        "additionalProperties": false
      },
      "SetupGenerationAcceptedObject": {
        "type": "object",
        "properties": {
          "task_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "task_url": {
            "type": "string",
            "minLength": 1
          },
          "brand_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "creation_mode": {
            "type": "string",
            "const": "auto"
          },
          "status": {
            "type": "string",
            "const": "queued"
          },
          "billing": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BillingObject"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "task_id",
          "task_url",
          "brand_id",
          "creation_mode",
          "status",
          "billing"
        ],
        "additionalProperties": false
      },
      "CompetitorListAcceptedObject": {
        "type": "object",
        "properties": {
          "task_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "task_url": {
            "type": "string",
            "minLength": 1
          },
          "brand_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "status": {
            "type": "string",
            "const": "queued"
          },
          "billing": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BillingObject"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "task_id",
          "task_url",
          "brand_id",
          "status",
          "billing"
        ],
        "additionalProperties": false
      },
      "CompetitorListObject": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "brand_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "country": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "completed",
              "failed"
            ]
          },
          "competitors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1
                },
                "url": {
                  "type": "string",
                  "minLength": 1
                },
                "reason": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "name",
                "url",
                "reason"
              ],
              "additionalProperties": false
            }
          },
          "created_at": {
            "type": "string"
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "brand_id",
          "country",
          "status",
          "competitors",
          "created_at",
          "completed_at"
        ],
        "additionalProperties": false,
        "description": "Up to 10 competitors, closest first. competitors is empty until status is completed. Save the ones to track with PATCH /v1/visibility-setups/{setup_id}."
      },
      "CompetitorSuggestionsObject": {
        "type": "object",
        "properties": {
          "scan_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "brand_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "suggestions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1
                },
                "url": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "answers": {
                  "type": "integer",
                  "minimum": 2,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "name",
                "url",
                "answers"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "scan_id",
          "brand_id",
          "suggestions"
        ],
        "additionalProperties": false,
        "description": "Up to 20 names, most answers first. answers is the number of answers of this scan that recommend the name. url is null when no answer gave a website. Empty for a scan that is not finished or that ran before suggestions existed."
      },
      "RejectedCompetitorSuggestionsObject": {
        "type": "object",
        "properties": {
          "brand_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "rejected": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "required": [
          "brand_id",
          "rejected"
        ],
        "additionalProperties": false,
        "description": "Every name rejected for this brand, oldest first."
      },
      "SetupArchivedObject": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "status": {
            "type": "string",
            "const": "archived"
          }
        },
        "required": [
          "id",
          "status"
        ],
        "additionalProperties": false
      },
      "BrandObject": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "url": {
            "type": "string",
            "minLength": 1
          },
          "country": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2
          },
          "language": {
            "type": "string",
            "minLength": 2,
            "maxLength": 10
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          },
          "processing_status": {
            "type": "string",
            "enum": [
              "processing",
              "ready",
              "failed"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "name",
          "url",
          "country",
          "language",
          "status",
          "processing_status",
          "created_at"
        ],
        "additionalProperties": false,
        "description": "processing_status is processing while Zaraftis reads the brand's website, then ready or failed."
      },
      "BrandListPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BrandListItem"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/ListPagination"
          }
        },
        "required": [
          "items",
          "pagination"
        ],
        "additionalProperties": false
      },
      "BrandListItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "url": {
            "type": "string",
            "minLength": 1
          },
          "country": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2
          },
          "language": {
            "type": "string",
            "minLength": 2,
            "maxLength": 10
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "archived"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "url",
          "country",
          "language",
          "status"
        ],
        "additionalProperties": false
      },
      "BrandTopicListPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BrandTopicListItem"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/ListPagination"
          }
        },
        "required": [
          "items",
          "pagination"
        ],
        "additionalProperties": false
      },
      "BrandTopicListItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "title": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive"
            ]
          }
        },
        "required": [
          "id",
          "title",
          "status"
        ],
        "additionalProperties": false
      },
      "BrandPromptListPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BrandPromptListItem"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/ListPagination"
          }
        },
        "required": [
          "items",
          "pagination"
        ],
        "additionalProperties": false
      },
      "BrandPromptListItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "text": {
            "type": "string",
            "minLength": 1
          },
          "topic_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "inactive",
              "trial_withheld"
            ]
          }
        },
        "required": [
          "id",
          "text",
          "topic_id",
          "status"
        ],
        "additionalProperties": false
      },
      "BrandCompetitorListPage": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BrandCompetitorListItem"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/ListPagination"
          }
        },
        "required": [
          "items",
          "pagination"
        ],
        "additionalProperties": false
      },
      "BrandCompetitorListItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "url": {
            "type": "string",
            "minLength": 1
          },
          "is_active": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "url",
          "is_active"
        ],
        "additionalProperties": false
      },
      "CompetitorListCreateRequest": {
        "type": "object",
        "properties": {
          "country": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2
          }
        },
        "required": [
          "country"
        ],
        "additionalProperties": false,
        "description": "The market to find competitors in, as an ISO 3166-1 alpha-2 country code."
      },
      "CompetitorSuggestionsPatchRequest": {
        "type": "object",
        "properties": {
          "reject": {
            "minItems": 1,
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        },
        "required": [
          "reject"
        ],
        "additionalProperties": false,
        "description": "Names that are not competitors of this brand."
      },
      "WalletAutoReloadConfig": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "threshold_credits": {
            "type": "integer",
            "minimum": 100,
            "maximum": 1000000
          },
          "target_credits": {
            "type": "integer",
            "minimum": 500,
            "maximum": 5000000
          }
        },
        "additionalProperties": false
      },
      "ExportCreateRequest": {
        "type": "object",
        "properties": {
          "report_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "format": {
            "type": "string",
            "enum": [
              "report_json",
              "observations_jsonl"
            ]
          }
        },
        "required": [
          "report_id",
          "format"
        ],
        "additionalProperties": false
      },
      "ScheduleCreateRequest": {
        "type": "object",
        "properties": {
          "setup_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "frequency": {
            "type": "string",
            "enum": [
              "daily",
              "weekly",
              "every_two_weeks",
              "monthly"
            ]
          },
          "timezone": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "local_time": {
            "type": "string",
            "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$"
          },
          "start_date": {
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
          }
        },
        "required": [
          "setup_id",
          "frequency",
          "timezone",
          "local_time",
          "start_date"
        ],
        "additionalProperties": false
      },
      "ScheduleUpdateRequest": {
        "type": "object",
        "properties": {
          "frequency": {
            "type": "string",
            "enum": [
              "daily",
              "weekly",
              "every_two_weeks",
              "monthly"
            ]
          },
          "timezone": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "local_time": {
            "type": "string",
            "pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$"
          },
          "start_date": {
            "type": "string",
            "format": "date",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "paused"
            ]
          }
        },
        "additionalProperties": false
      },
      "ScheduleDeleteRequest": {
        "type": "object",
        "properties": {
          "confirm": {
            "type": "boolean"
          }
        },
        "required": [
          "confirm"
        ],
        "additionalProperties": false
      },
      "SetupCreateRequest": {
        "type": "object",
        "properties": {
          "creation_mode": {
            "type": "string",
            "enum": [
              "manual",
              "auto"
            ]
          },
          "brand_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "new_brand": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string",
                "format": "uri"
              },
              "name": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "aliases": {
                "maxItems": 50,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 255
                }
              },
              "country": {
                "type": "string",
                "minLength": 2,
                "maxLength": 2
              },
              "language": {
                "type": "string",
                "minLength": 2,
                "maxLength": 10
              }
            },
            "required": [
              "url"
            ],
            "additionalProperties": false
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "country": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2
          },
          "language": {
            "type": "string",
            "minLength": 2,
            "maxLength": 10
          },
          "platform_ids": {
            "minItems": 1,
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            }
          },
          "topics": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                }
              },
              "required": [
                "title"
              ],
              "additionalProperties": false
            }
          },
          "prompts": {
            "minItems": 1,
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "topic_title": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "text"
              ],
              "additionalProperties": false
            }
          },
          "competitors": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "required": [
                "name",
                "url"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "creation_mode",
          "country",
          "language",
          "platform_ids"
        ],
        "additionalProperties": false,
        "description": "creation_mode manual or auto, exactly one of brand_id/new_brand (auto: brand_id only), required country and language, at least one platform. Manual: 1-200 prompts with optional topic titles and optional topics (max 20). Auto: no topics or prompts. Optional competitors (max 20)."
      },
      "SetupUpdateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "country": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2
          },
          "language": {
            "type": "string",
            "minLength": 2,
            "maxLength": 10
          },
          "platform_ids": {
            "minItems": 1,
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            }
          },
          "topics": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                }
              },
              "required": [
                "title"
              ],
              "additionalProperties": false
            }
          },
          "prompts": {
            "minItems": 1,
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 500
                },
                "topic_title": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "text"
              ],
              "additionalProperties": false
            }
          },
          "competitors": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "required": [
                "name",
                "url"
              ],
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false,
        "description": "Send name, the content edit, or both. A content edit sends country, language, platform_ids, and prompts together."
      },
      "SetupDeleteRequest": {
        "type": "object",
        "properties": {
          "confirm": {
            "type": "boolean"
          }
        },
        "required": [
          "confirm"
        ],
        "additionalProperties": false,
        "description": "Send { \"confirm\": true }."
      },
      "SetupCopyRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "additionalProperties": false,
        "description": "Optional. name names the copy."
      },
      "ScanCreateRequest": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "setup_id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "prompt_selection": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "const": "all"
                      }
                    },
                    "required": [
                      "mode"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "const": "selected"
                      },
                      "prompt_ids": {
                        "minItems": 1,
                        "maxItems": 150,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        }
                      }
                    },
                    "required": [
                      "mode",
                      "prompt_ids"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              "platform_selection": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "const": "all"
                      }
                    },
                    "required": [
                      "mode"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "mode": {
                        "type": "string",
                        "const": "selected"
                      },
                      "platform_ids": {
                        "minItems": 1,
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64
                        }
                      }
                    },
                    "required": [
                      "mode",
                      "platform_ids"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              "response_detail": {
                "type": "string",
                "enum": [
                  "compact",
                  "detailed"
                ]
              }
            },
            "required": [
              "setup_id"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "brand_id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "country": {
                "type": "string",
                "minLength": 2,
                "maxLength": 2
              },
              "language": {
                "type": "string",
                "minLength": 2,
                "maxLength": 10
              },
              "platform_ids": {
                "minItems": 1,
                "maxItems": 12,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                }
              },
              "prompts": {
                "minItems": 1,
                "maxItems": 150,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "topic_title": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "text"
                  ],
                  "additionalProperties": false
                }
              },
              "competitors": {
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "required": [
                    "name",
                    "url"
                  ],
                  "additionalProperties": false
                }
              },
              "response_detail": {
                "type": "string",
                "enum": [
                  "compact",
                  "detailed"
                ]
              }
            },
            "required": [
              "brand_id",
              "country",
              "language",
              "platform_ids",
              "prompts"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "new_brand": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "name": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 255
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "aliases": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 255
                    }
                  },
                  "country": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 2
                  },
                  "language": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 10
                  }
                },
                "required": [
                  "url"
                ],
                "additionalProperties": false
              },
              "country": {
                "type": "string",
                "minLength": 2,
                "maxLength": 2
              },
              "language": {
                "type": "string",
                "minLength": 2,
                "maxLength": 10
              },
              "platform_ids": {
                "minItems": 1,
                "maxItems": 12,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                }
              },
              "prompts": {
                "minItems": 1,
                "maxItems": 150,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    },
                    "topic_title": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "text"
                  ],
                  "additionalProperties": false
                }
              },
              "competitors": {
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "required": [
                    "name",
                    "url"
                  ],
                  "additionalProperties": false
                }
              },
              "response_detail": {
                "type": "string",
                "enum": [
                  "compact",
                  "detailed"
                ]
              }
            },
            "required": [
              "new_brand",
              "country",
              "language",
              "platform_ids",
              "prompts"
            ],
            "additionalProperties": false
          }
        ],
        "description": "Exactly one of three request forms: (1) saved_setup with a setup_id and optional prompt/platform selections, or (2) one-time with brand_id, or (3) one-time with new_brand. One-time forms require country, language, at least one platform_id, and 1-150 prompts (1-500 chars, no duplicate text); competitors optional 0-20. Each plan caps a scan at 25, 100, or 150 prompts and 50, 500, or 750 queries; a request over the cap is rejected and not charged."
      }
    }
  }
}