{
  "openapi": "3.1.0",
  "info": {
    "title": "Helios API",
    "summary": "Cited multifamily site screening for Toronto and Montréal, from open data.",
    "description": "Every figure is computed from public sources and carries its citations. Helios never states that a building complies with a code, is safe, is undervalued or is legally buildable; valuations state their method and assumptions. Parts built only on a source whose licence does not yet allow redistribution (CMHC, CREA, TRCA) are withheld and listed under `licence`.\n\nAuthenticate with `Authorization: Bearer hk_...`. Runs are asynchronous: submit with `POST /runs`, then poll `GET /jobs/{job_id}`, or send `Prefer: wait=60` to wait for the answer.",
    "version": "1.0.0"
  },
  "paths": {
    "/me": {
      "get": {
        "tags": [
          "account"
        ],
        "summary": "The calling key: tenant, scopes, quotas and recent usage",
        "operationId": "me_me_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/sources": {
      "get": {
        "tags": [
          "sources"
        ],
        "summary": "Source cards with licence and whether results may be shared",
        "operationId": "source_cards_sources_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/coverage": {
      "get": {
        "tags": [
          "sources"
        ],
        "summary": "What Helios answers, partly answers or does not answer (and why)",
        "operationId": "question_coverage_coverage_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "question",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 2000
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only the families this question touches",
              "title": "Question"
            },
            "description": "Only the families this question touches"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/parcels/search": {
      "get": {
        "tags": [
          "parcels"
        ],
        "summary": "Find parcels by address or id",
        "operationId": "search_parcels_search_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 120,
              "title": "Q"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 25,
              "minimum": 1,
              "default": 8,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/parcels/{ref}/report": {
      "get": {
        "tags": [
          "parcels"
        ],
        "summary": "Parcel report: zoning, envelope, hazards, transit, activity",
        "operationId": "report_parcels__ref__report_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 80,
              "description": "Canonical parcel id (hp_...), golden id, PARCELID or address",
              "title": "Ref"
            },
            "description": "Canonical parcel id (hp_...), golden id, PARCELID or address"
          },
          {
            "name": "as_of",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Use only data available on this date",
              "title": "As Of"
            },
            "description": "Use only data available on this date"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/parcels/{ref}/risk": {
      "get": {
        "tags": [
          "parcels"
        ],
        "summary": "Due-diligence risk register",
        "operationId": "risk_parcels__ref__risk_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 80,
              "description": "Canonical parcel id (hp_...), golden id, PARCELID or address",
              "title": "Ref"
            },
            "description": "Canonical parcel id (hp_...), golden id, PARCELID or address"
          },
          {
            "name": "as_of",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "As Of"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/parcels/{ref}/facts": {
      "get": {
        "tags": [
          "parcels"
        ],
        "summary": "Property facts: use, lot, buildings, height, floor area, storeys, year built, units",
        "operationId": "facts_parcels__ref__facts_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 80,
              "description": "Canonical parcel id (hp_...), golden id, PARCELID or address",
              "title": "Ref"
            },
            "description": "Canonical parcel id (hp_...), golden id, PARCELID or address"
          },
          {
            "name": "as_of",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Current snapshots are withheld for a past date",
              "title": "As Of"
            },
            "description": "Current snapshots are withheld for a past date"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/parcels/{ref}/suites": {
      "get": {
        "tags": [
          "parcels"
        ],
        "summary": "Garden and laneway suite potential (Toronto By-law 569-2013 ch. 150.7, 150.8), each check with its section",
        "operationId": "suites_parcels__ref__suites_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 80,
              "description": "Canonical parcel id (hp_...), golden id, PARCELID or address",
              "title": "Ref"
            },
            "description": "Canonical parcel id (hp_...), golden id, PARCELID or address"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/parcels/{ref}/heights": {
      "get": {
        "tags": [
          "parcels"
        ],
        "summary": "Building heights and roof form from the newest lidar survey covering the lot (NRCan HRDEM)",
        "operationId": "heights_parcels__ref__heights_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 80,
              "description": "Canonical parcel id (hp_...), golden id, PARCELID or address",
              "title": "Ref"
            },
            "description": "Canonical parcel id (hp_...), golden id, PARCELID or address"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/parcels/{ref}/value": {
      "get": {
        "tags": [
          "parcels"
        ],
        "summary": "Indicative income value and rent of a rental building (CMHC parts withheld while internal-only)",
        "operationId": "value_parcels__ref__value_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 80,
              "description": "Canonical parcel id (hp_...), golden id, PARCELID or address",
              "title": "Ref"
            },
            "description": "Canonical parcel id (hp_...), golden id, PARCELID or address"
          },
          {
            "name": "cap_rate_pct",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number",
                  "maximum": 15,
                  "minimum": 1
                },
                {
                  "type": "null"
                }
              ],
              "title": "Cap Rate Pct"
            }
          },
          {
            "name": "monthly_rent",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number",
                  "exclusiveMaximum": 50000,
                  "exclusiveMinimum": 0
                },
                {
                  "type": "null"
                }
              ],
              "title": "Monthly Rent"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/parcels/{ref}/compliance": {
      "get": {
        "tags": [
          "parcels"
        ],
        "summary": "Compliance evidence: today's limits, outlines without permits, municipal investigations (never a determination)",
        "operationId": "compliance_parcels__ref__compliance_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 80,
              "description": "Canonical parcel id (hp_...), golden id, PARCELID or address",
              "title": "Ref"
            },
            "description": "Canonical parcel id (hp_...), golden id, PARCELID or address"
          },
          {
            "name": "as_of",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "As Of"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/parcels/{ref}/condition": {
      "get": {
        "tags": [
          "parcels"
        ],
        "summary": "Existing-building condition evidence (never a compliance finding)",
        "operationId": "condition_parcels__ref__condition_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 80,
              "description": "Canonical parcel id (hp_...), golden id, PARCELID or address",
              "title": "Ref"
            },
            "description": "Canonical parcel id (hp_...), golden id, PARCELID or address"
          },
          {
            "name": "as_of",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "As Of"
            }
          },
          {
            "name": "imagery",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": true,
              "title": "Imagery"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/parcels/{ref}/forecast": {
      "get": {
        "tags": [
          "parcels"
        ],
        "summary": "Market value forecast (withheld while its source is internal-only)",
        "operationId": "forecast_parcels__ref__forecast_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 80,
              "description": "Canonical parcel id (hp_...), golden id, PARCELID or address",
              "title": "Ref"
            },
            "description": "Canonical parcel id (hp_...), golden id, PARCELID or address"
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20,
              "default": "composite",
              "title": "Kind"
            }
          },
          {
            "name": "value",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number",
                  "exclusiveMaximum": 10000000000.0,
                  "exclusiveMinimum": 0
                },
                {
                  "type": "null"
                }
              ],
              "title": "Value"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/analysis/area": {
      "get": {
        "tags": [
          "analyses"
        ],
        "summary": "Area overview: zoning mix, transit, pipeline, building heights",
        "operationId": "area_analysis_area_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "lon",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number",
                  "maximum": 180,
                  "minimum": -180
                },
                {
                  "type": "null"
                }
              ],
              "title": "Lon"
            }
          },
          {
            "name": "lat",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number",
                  "maximum": 90,
                  "minimum": -90
                },
                {
                  "type": "null"
                }
              ],
              "title": "Lat"
            }
          },
          {
            "name": "radius_m",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "maximum": 2000,
              "minimum": 100,
              "default": 800,
              "title": "Radius M"
            }
          },
          {
            "name": "polygon",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 4000
                },
                {
                  "type": "null"
                }
              ],
              "description": "Drawn area as 'lon lat;lon lat;...' (closed automatically)",
              "title": "Polygon"
            },
            "description": "Drawn area as 'lon lat;lon lat;...' (closed automatically)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/analysis/screen": {
      "get": {
        "tags": [
          "analyses"
        ],
        "summary": "Parcels ranked by unused as-of-right floor area",
        "operationId": "screen_analysis_screen_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "lon",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number",
                  "maximum": 180,
                  "minimum": -180
                },
                {
                  "type": "null"
                }
              ],
              "title": "Lon"
            }
          },
          {
            "name": "lat",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number",
                  "maximum": 90,
                  "minimum": -90
                },
                {
                  "type": "null"
                }
              ],
              "title": "Lat"
            }
          },
          {
            "name": "radius_m",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "maximum": 1000,
              "minimum": 50,
              "default": 500,
              "title": "Radius M"
            }
          },
          {
            "name": "polygon",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 4000
                },
                {
                  "type": "null"
                }
              ],
              "description": "Drawn area as 'lon lat;lon lat;...' (closed automatically)",
              "title": "Polygon"
            },
            "description": "Drawn area as 'lon lat;lon lat;...' (closed automatically)"
          },
          {
            "name": "min_lot_area_m2",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ],
              "title": "Min Lot Area M2"
            }
          },
          {
            "name": "zone_category",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 60
                },
                {
                  "type": "null"
                }
              ],
              "title": "Zone Category"
            }
          },
          {
            "name": "max_rapid_transit_m",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number",
                  "minimum": 0
                },
                {
                  "type": "null"
                }
              ],
              "title": "Max Rapid Transit M"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 25,
              "minimum": 1,
              "default": 10,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/analysis/market": {
      "get": {
        "tags": [
          "analyses"
        ],
        "summary": "Supply pipeline and development comparables (demand withheld while internal-only)",
        "operationId": "market_analysis_market_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "lon",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number",
                  "maximum": 180,
                  "minimum": -180
                },
                {
                  "type": "null"
                }
              ],
              "title": "Lon"
            }
          },
          {
            "name": "lat",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number",
                  "maximum": 90,
                  "minimum": -90
                },
                {
                  "type": "null"
                }
              ],
              "title": "Lat"
            }
          },
          {
            "name": "radius_m",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "maximum": 1500,
              "minimum": 200,
              "default": 800,
              "title": "Radius M"
            }
          },
          {
            "name": "polygon",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 4000
                },
                {
                  "type": "null"
                }
              ],
              "description": "Drawn area as 'lon lat;lon lat;...' (closed automatically)",
              "title": "Polygon"
            },
            "description": "Drawn area as 'lon lat;lon lat;...' (closed automatically)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/analysis/massing": {
      "get": {
        "tags": [
          "analyses"
        ],
        "summary": "A drawn volume against the as-of-right envelope",
        "operationId": "massing_analysis_massing_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "polygon",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 4000,
              "title": "Polygon"
            }
          },
          {
            "name": "storeys",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "maximum": 120,
              "minimum": 1,
              "title": "Storeys"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/neighbourhoods/profile": {
      "get": {
        "tags": [
          "analyses"
        ],
        "summary": "One neighbourhood ranked among its city's neighbourhoods",
        "operationId": "neighbourhood_profile_neighbourhoods_profile_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "place",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 120,
              "description": "Neighbourhood name, street address or parcel id",
              "title": "Place"
            },
            "description": "Neighbourhood name, street address or parcel id"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/neighbourhoods/rank": {
      "get": {
        "tags": [
          "analyses"
        ],
        "summary": "Neighbourhoods ranked by an index 0-100, with backtests",
        "operationId": "neighbourhoods_rank_neighbourhoods_rank_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "index",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(demand_surge|supply_pressure|market_tightness|neighbourhood_health|climate_exposure)$",
              "default": "demand_surge",
              "title": "Index"
            }
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20,
              "default": "Toronto",
              "title": "City"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(top|bottom)$",
              "default": "top",
              "title": "Order"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 25,
              "minimum": 1,
              "default": 10,
              "title": "Limit"
            }
          },
          {
            "name": "near",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 120
                },
                {
                  "type": "null"
                }
              ],
              "title": "Near"
            }
          },
          {
            "name": "radius_km",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "maximum": 8,
              "minimum": 0.5,
              "default": 3,
              "title": "Radius Km"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/neighbourhoods/dynamics": {
      "get": {
        "tags": [
          "analyses"
        ],
        "summary": "Area KPI dashboard: indices, projection, supply, parcel funnel",
        "operationId": "neighbourhoods_dynamics_neighbourhoods_dynamics_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "place",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 120,
              "title": "Place"
            }
          },
          {
            "name": "radius_km",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "maximum": 5,
              "minimum": 0.5,
              "default": 1.5,
              "title": "Radius Km"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/opportunities/sectors": {
      "get": {
        "tags": [
          "analyses"
        ],
        "summary": "Neighbourhoods ranked per sector by published proxies",
        "operationId": "opportunities_sectors_opportunities_sectors_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20,
              "default": "Toronto",
              "title": "City"
            }
          },
          {
            "name": "sector",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^(multifamily|retail|office|industrial)$"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Sector"
            }
          },
          {
            "name": "near",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 120
                },
                {
                  "type": "null"
                }
              ],
              "title": "Near"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/opportunities/invest": {
      "get": {
        "tags": [
          "analyses"
        ],
        "summary": "Zones to examine for an equity budget (not advice)",
        "operationId": "opportunities_invest_opportunities_invest_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "budget",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number",
              "maximum": 5000000000,
              "minimum": 100000,
              "title": "Budget"
            }
          },
          {
            "name": "city",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 20,
              "default": "Toronto",
              "title": "City"
            }
          },
          {
            "name": "ltv_pct",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "maximum": 95,
              "minimum": 0,
              "default": 60,
              "title": "Ltv Pct"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/scenarios/run": {
      "get": {
        "tags": [
          "analyses"
        ],
        "summary": "What-if with before and after: transit station, density, water level, rates",
        "operationId": "scenario_run_scenarios_run_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "scenario",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(transit_station|density|water_level|rates)$",
              "title": "Scenario"
            }
          },
          {
            "name": "place",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 120,
              "title": "Place"
            }
          },
          {
            "name": "rise_m",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "maximum": 5,
              "minimum": -1,
              "default": 1.0,
              "title": "Rise M"
            }
          },
          {
            "name": "reference_m",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number",
                  "maximum": 500,
                  "minimum": -10
                },
                {
                  "type": "null"
                }
              ],
              "title": "Reference M"
            }
          },
          {
            "name": "factor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "maximum": 5,
              "minimum": 0.25,
              "default": 2.0,
              "title": "Factor"
            }
          },
          {
            "name": "delta_bps",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "maximum": 500,
              "minimum": -500,
              "default": -150,
              "title": "Delta Bps"
            }
          },
          {
            "name": "cap_pass_through",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "maximum": 1,
              "minimum": 0,
              "default": 0,
              "title": "Cap Pass Through"
            }
          },
          {
            "name": "purchase_price",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                {
                  "type": "null"
                }
              ],
              "title": "Purchase Price"
            }
          },
          {
            "name": "radius_m",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "number",
                  "maximum": 2000,
                  "minimum": 50
                },
                {
                  "type": "null"
                }
              ],
              "title": "Radius M"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/neighbourhoods/compare": {
      "get": {
        "tags": [
          "analyses"
        ],
        "summary": "Neighbourhoods near a place with climate, safety and decline concerns (published rules N1-N6)",
        "operationId": "neighbourhoods_compare_neighbourhoods_compare_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "place",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 120,
              "title": "Place"
            }
          },
          {
            "name": "radius_km",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number",
              "maximum": 8,
              "minimum": 0.5,
              "default": 2,
              "title": "Radius Km"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/runs": {
      "post": {
        "tags": [
          "runs"
        ],
        "summary": "Submit a question or a map analysis; stored as a run",
        "operationId": "submit_run_runs_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "prefer",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "'wait=<seconds>' (max 120) to wait for the answer",
              "title": "Prefer"
            },
            "description": "'wait=<seconds>' (max 120) to wait for the answer"
          },
          {
            "name": "idempotency-key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Retrying with the same key returns the same job",
              "title": "Idempotency-Key"
            },
            "description": "Retrying with the same key returns the same job"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "200": {
            "description": "Finished within the Prefer: wait time"
          },
          "409": {
            "description": "Idempotency-Key reused"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/jobs/{job_id}": {
      "get": {
        "tags": [
          "runs"
        ],
        "summary": "State of a submitted run",
        "operationId": "get_job_jobs__job_id__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40,
              "title": "Job Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/runs/{run_id}": {
      "get": {
        "tags": [
          "runs"
        ],
        "summary": "One stored run: answer, results, findings, versions and hashes",
        "operationId": "get_run_runs__run_id__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40,
              "title": "Run Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/runs/{run_id}/memo": {
      "get": {
        "tags": [
          "runs"
        ],
        "summary": "The run as a memo (HTML, PDF or JSON)",
        "operationId": "run_memo_runs__run_id__memo_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40,
              "title": "Run Id"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(html|pdf|json)$",
              "default": "pdf",
              "title": "Format"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^(en|fr)$"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Lang"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/runs/{run_id}/reviews": {
      "post": {
        "tags": [
          "runs"
        ],
        "summary": "Accept, correct or reject a stored run (append-only; the run never changes)",
        "operationId": "review_run_runs__run_id__reviews_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40,
              "title": "Run Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReviewRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "runs"
        ],
        "summary": "Reviews of a run, oldest first",
        "operationId": "run_reviews_runs__run_id__reviews_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40,
              "title": "Run Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/investigations/{investigation_id}": {
      "get": {
        "tags": [
          "runs"
        ],
        "summary": "An investigation and its runs",
        "operationId": "get_investigation_investigations__investigation_id__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "investigation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40,
              "title": "Investigation Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/runs/{run_id}/export": {
      "get": {
        "tags": [
          "runs"
        ],
        "summary": "The run's area and parcels (GeoJSON, KML) or its underwriting workbook (xlsx)",
        "operationId": "run_export_runs__run_id__export_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "run_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40,
              "title": "Run Id"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(geojson|kml|xlsx)$",
              "default": "geojson",
              "title": "Format"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^(en|fr)$"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Lang"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/parcels/{ref}/export": {
      "get": {
        "tags": [
          "parcels"
        ],
        "summary": "One parcel's outline with its report's headline values (GeoJSON, KML)",
        "operationId": "parcel_export_parcels__ref__export_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 80,
              "description": "Canonical parcel id (hp_...), golden id, PARCELID or address",
              "title": "Ref"
            },
            "description": "Canonical parcel id (hp_...), golden id, PARCELID or address"
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(geojson|kml)$",
              "default": "geojson",
              "title": "Format"
            }
          },
          {
            "name": "as_of",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "As Of"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/investigations/{investigation_id}/publish": {
      "post": {
        "tags": [
          "runs"
        ],
        "summary": "Publish the investigation to Notion or SharePoint (updated in place on republish)",
        "operationId": "investigation_publish_investigations__investigation_id__publish_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "investigation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40,
              "title": "Investigation Id"
            }
          },
          {
            "name": "target",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(notion|sharepoint)$",
              "title": "Target"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^(en|fr)$"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Lang"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/investigations/{investigation_id}/memo": {
      "get": {
        "tags": [
          "runs"
        ],
        "summary": "The whole investigation as one memo",
        "operationId": "investigation_memo_investigations__investigation_id__memo_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "investigation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40,
              "title": "Investigation Id"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(html|pdf|json)$",
              "default": "pdf",
              "title": "Format"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^(en|fr)$"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Lang"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/keys": {
      "get": {
        "tags": [
          "account"
        ],
        "summary": "The tenant's API keys (admin)",
        "operationId": "list_keys_keys_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      },
      "post": {
        "tags": [
          "account"
        ],
        "summary": "Create a key for the tenant (admin); the token is shown once",
        "operationId": "create_key_keys_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewKey"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/keys/{key_id}/revoke": {
      "post": {
        "tags": [
          "account"
        ],
        "summary": "Revoke one of the tenant's keys (admin)",
        "operationId": "revoke_key_keys__key_id__revoke_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "key_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{12}$",
              "title": "Key Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/usage": {
      "get": {
        "tags": [
          "account"
        ],
        "summary": "Requests and runs per day and key (admin)",
        "operationId": "tenant_usage_usage_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 90,
              "minimum": 1,
              "default": 30,
              "title": "Days"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/monitors": {
      "get": {
        "tags": [
          "monitors"
        ],
        "summary": "The tenant's monitors and monitor groups",
        "operationId": "list_monitors_monitors_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      },
      "post": {
        "tags": [
          "monitors"
        ],
        "summary": "Watch a parcel or an area; a crossed threshold sends a signed monitor.changed webhook",
        "operationId": "create_monitor_monitors_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MonitorRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/branding": {
      "get": {
        "tags": [
          "reports"
        ],
        "summary": "The tenant's report branding",
        "operationId": "get_branding_branding_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      },
      "put": {
        "tags": [
          "reports"
        ],
        "summary": "Set the tenant's report branding: name, logo, footer, accent colour (admin)",
        "operationId": "put_branding_branding_put",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BrandingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/reports": {
      "post": {
        "tags": [
          "reports"
        ],
        "summary": "A branded PDF for a parcel or a completed portfolio, behind a link that expires",
        "operationId": "create_report_reports_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/reports/{report_id}/pdf": {
      "get": {
        "tags": [
          "reports"
        ],
        "summary": "Download a report through its link (no key; 410 once expired)",
        "operationId": "report_pdf_reports__report_id__pdf_get",
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^rpt_[0-9a-f]{16}$",
              "title": "Report Id"
            }
          },
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 20,
              "maxLength": 64,
              "title": "Token"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              },
              "application/pdf": {}
            }
          },
          "410": {
            "description": "The link has expired"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/search": {
      "post": {
        "tags": [
          "search"
        ],
        "summary": "Find properties by recorded attributes: inspections, declared systems, fire and by-law records, year built, units",
        "operationId": "property_search_search_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/searches": {
      "get": {
        "tags": [
          "search"
        ],
        "summary": "The tenant's saved searches",
        "operationId": "list_searches_searches_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      },
      "post": {
        "tags": [
          "search"
        ],
        "summary": "Save a search (a custom screen) for the tenant",
        "operationId": "save_search_searches_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SavedSearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/searches/{search_id}": {
      "delete": {
        "tags": [
          "search"
        ],
        "summary": "Delete a saved search",
        "operationId": "delete_search_searches__search_id__delete",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "search_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^ss_[0-9a-f]{12}$",
              "title": "Search Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/portfolios": {
      "get": {
        "tags": [
          "portfolios"
        ],
        "summary": "The tenant's portfolios, newest first",
        "operationId": "list_portfolios_portfolios_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      },
      "post": {
        "tags": [
          "portfolios"
        ],
        "summary": "Upload up to 5,000 addresses or parcel ids; each is resolved (never guessed) and analysed in the background",
        "operationId": "create_portfolio_portfolios_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PortfolioRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/portfolios/{portfolio_id}": {
      "get": {
        "tags": [
          "portfolios"
        ],
        "summary": "A portfolio's status and resolution summary",
        "operationId": "get_portfolio_portfolios__portfolio_id__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "portfolio_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^pf_[0-9a-f]{16}$",
              "title": "Portfolio Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/portfolios/{portfolio_id}/results": {
      "get": {
        "tags": [
          "portfolios"
        ],
        "summary": "Rows with their resolution and analyses (JSON, CSV, GeoJSON or xlsx); internal-only figures withheld",
        "operationId": "portfolio_results_portfolios__portfolio_id__results_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "portfolio_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^pf_[0-9a-f]{16}$",
              "title": "Portfolio Id"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(json|csv|geojson|xlsx)$",
              "default": "json",
              "title": "Format"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^(matched|ambiguous|duplicate|not_found|pending)$"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/monitors/{monitor_id}": {
      "get": {
        "tags": [
          "monitors"
        ],
        "summary": "One monitor (or area group) with its recent checks",
        "operationId": "get_monitor_monitors__monitor_id__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "monitor_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(mon|mgr)_[0-9a-f]{12}$",
              "title": "Monitor Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "monitors"
        ],
        "summary": "Stop a monitor (or every monitor of an area group)",
        "operationId": "stop_monitor_monitors__monitor_id__delete",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "monitor_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^(mon|mgr)_[0-9a-f]{12}$",
              "title": "Monitor Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks": {
      "get": {
        "tags": [
          "webhooks"
        ],
        "summary": "The tenant's webhook endpoints (admin)",
        "operationId": "list_webhooks_webhooks_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      },
      "post": {
        "tags": [
          "webhooks"
        ],
        "summary": "Register an endpoint (admin); its signing secret is shown once",
        "operationId": "create_webhook_webhooks_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NewWebhook"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ]
      }
    },
    "/webhooks/{endpoint_id}/test": {
      "post": {
        "tags": [
          "webhooks"
        ],
        "summary": "Queue a signed test event (type webhook.test) to one endpoint (admin)",
        "operationId": "test_webhook_webhooks__endpoint_id__test_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40,
              "title": "Endpoint Id"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/{endpoint_id}/disable": {
      "post": {
        "tags": [
          "webhooks"
        ],
        "summary": "Stop sending to an endpoint (admin)",
        "operationId": "disable_webhook_webhooks__endpoint_id__disable_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40,
              "title": "Endpoint Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/{endpoint_id}/deliveries": {
      "get": {
        "tags": [
          "webhooks"
        ],
        "summary": "Recent deliveries to an endpoint (admin)",
        "operationId": "webhook_deliveries_webhooks__endpoint_id__deliveries_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "endpoint_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 40,
              "title": "Endpoint Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Analysis": {
        "properties": {
          "kind": {
            "type": "string",
            "pattern": "^(point|area|volume)$",
            "title": "Kind"
          },
          "lon": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 180.0,
                "minimum": -180.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Lon"
          },
          "lat": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 90.0,
                "minimum": -90.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Lat"
          },
          "polygon": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4000
              },
              {
                "type": "null"
              }
            ],
            "title": "Polygon"
          },
          "storeys": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 120.0,
                "minimum": 1.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Storeys"
          }
        },
        "type": "object",
        "required": [
          "kind"
        ],
        "title": "Analysis",
        "description": "A point, a drawn area or a drawn volume, analysed without a language model."
      },
      "BrandingRequest": {
        "properties": {
          "display_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 80
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name"
          },
          "logo_base64": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 280000
              },
              {
                "type": "null"
              }
            ],
            "title": "Logo Base64",
            "description": "PNG or JPEG, at most 200 KB, base64"
          },
          "footer_text": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 160
              },
              {
                "type": "null"
              }
            ],
            "title": "Footer Text"
          },
          "accent_hex": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^#[0-9a-fA-F]{6}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Accent Hex"
          }
        },
        "type": "object",
        "title": "BrandingRequest"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "MonitorRequest": {
        "properties": {
          "parcel": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 80
              },
              {
                "type": "null"
              }
            ],
            "title": "Parcel",
            "description": "One parcel (address or id)"
          },
          "portfolio_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^pf_[0-9a-f]{16}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Portfolio Id",
            "description": "Portfolio monitor: every matched parcel of a completed portfolio"
          },
          "lon": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 180.0,
                "minimum": -180.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Lon"
          },
          "lat": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 90.0,
                "minimum": -90.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Lat"
          },
          "radius_m": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 500.0,
                "minimum": 25.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Radius M",
            "description": "Area monitor: every parcel within this radius"
          },
          "polygon": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4000
              },
              {
                "type": "null"
              }
            ],
            "title": "Polygon",
            "description": "Area monitor: 'lon lat;lon lat;...'"
          },
          "thresholds": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MonitorThresholds"
              },
              {
                "type": "null"
              }
            ]
          },
          "frequency_days": {
            "type": "integer",
            "maximum": 365.0,
            "minimum": 1.0,
            "title": "Frequency Days",
            "description": "Days between checks",
            "default": 7
          },
          "label": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 120
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          }
        },
        "type": "object",
        "title": "MonitorRequest"
      },
      "MonitorThresholds": {
        "properties": {
          "material_sections": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 8
              },
              {
                "type": "null"
              }
            ],
            "title": "Material Sections",
            "description": "Report sections whose changes count (default gates, zoning, envelope, hazards, activity)"
          },
          "condition_level_change": {
            "type": "boolean",
            "title": "Condition Level Change",
            "description": "A building part changes level (good, watch, concern, unknown)",
            "default": true
          },
          "new_compliance_record": {
            "type": "boolean",
            "title": "New Compliance Record",
            "description": "A new municipal investigation or compliance flag",
            "default": true
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "MonitorThresholds"
      },
      "NewKey": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 80,
            "minLength": 2,
            "title": "Name"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 3,
            "minItems": 1,
            "title": "Scopes",
            "description": "read, run, export (admin keys come from the CLI)"
          }
        },
        "type": "object",
        "required": [
          "name",
          "scopes"
        ],
        "title": "NewKey"
      },
      "NewWebhook": {
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 500,
            "minLength": 10,
            "title": "Url",
            "description": "HTTPS URL that receives signed POSTs"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 2,
            "minItems": 1,
            "title": "Events",
            "default": [
              "run.completed",
              "run.failed"
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 120
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          }
        },
        "type": "object",
        "required": [
          "url"
        ],
        "title": "NewWebhook"
      },
      "PortfolioRequest": {
        "properties": {
          "label": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 120
              },
              {
                "type": "null"
              }
            ],
            "title": "Label"
          },
          "csv": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000000
              },
              {
                "type": "null"
              }
            ],
            "title": "Csv",
            "description": "CSV text with an 'address' (or 'parcel') column and an optional 'ref' column"
          },
          "rows": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/PortfolioRow"
                },
                "type": "array",
                "maxItems": 5000
              },
              {
                "type": "null"
              }
            ],
            "title": "Rows"
          },
          "analyses": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Analyses",
            "description": "Any of facts, condition, compliance, value"
          }
        },
        "type": "object",
        "title": "PortfolioRequest"
      },
      "PortfolioRow": {
        "properties": {
          "address": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 200
              },
              {
                "type": "null"
              }
            ],
            "title": "Address",
            "description": "Civic address, or a Helios parcel id"
          },
          "parcel": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 80
              },
              {
                "type": "null"
              }
            ],
            "title": "Parcel"
          },
          "ref": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 80
              },
              {
                "type": "null"
              }
            ],
            "title": "Ref",
            "description": "Your own reference, returned with the row"
          }
        },
        "type": "object",
        "title": "PortfolioRow"
      },
      "ReportRequest": {
        "properties": {
          "parcel": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 80
              },
              {
                "type": "null"
              }
            ],
            "title": "Parcel"
          },
          "portfolio_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^pf_[0-9a-f]{16}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Portfolio Id"
          },
          "sections": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "maxItems": 6
              },
              {
                "type": "null"
              }
            ],
            "title": "Sections",
            "description": "Any of facts, zoning, condition, compliance, value, risk (parcel reports)"
          },
          "expires_in_days": {
            "type": "integer",
            "maximum": 30.0,
            "minimum": 1.0,
            "title": "Expires In Days",
            "default": 7
          }
        },
        "type": "object",
        "title": "ReportRequest"
      },
      "ReviewRequest": {
        "properties": {
          "decision": {
            "type": "string",
            "pattern": "^(accept|correct|reject)$",
            "title": "Decision"
          },
          "reviewer": {
            "type": "string",
            "maxLength": 120,
            "minLength": 2,
            "title": "Reviewer"
          },
          "qualification": {
            "type": "string",
            "maxLength": 160,
            "minLength": 2,
            "title": "Qualification"
          },
          "rationale": {
            "type": "string",
            "maxLength": 4000,
            "minLength": 10,
            "title": "Rationale"
          },
          "correction": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4000
              },
              {
                "type": "null"
              }
            ],
            "title": "Correction"
          },
          "finding_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^f\\d{1,3}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finding Id"
          }
        },
        "type": "object",
        "required": [
          "decision",
          "reviewer",
          "qualification",
          "rationale"
        ],
        "title": "ReviewRequest"
      },
      "RunRequest": {
        "properties": {
          "question": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Question",
            "description": "A question about parcels (answered by the model gateway, from tool results only)"
          },
          "analysis": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Analysis"
              },
              {
                "type": "null"
              }
            ],
            "description": "Or a deterministic map analysis"
          },
          "parcel": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 80
              },
              {
                "type": "null"
              }
            ],
            "title": "Parcel",
            "description": "The parcel the question is about, if any"
          },
          "as_of": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "As Of"
          },
          "investigation_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^inv_[0-9a-f]{16}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Investigation Id",
            "description": "Add the run to an existing investigation"
          }
        },
        "type": "object",
        "title": "RunRequest"
      },
      "SavedSearchRequest": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 120,
            "minLength": 1,
            "title": "Name"
          },
          "query": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Query"
          },
          "filters": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filters"
          }
        },
        "type": "object",
        "required": [
          "name"
        ],
        "title": "SavedSearchRequest"
      },
      "SearchRequest": {
        "properties": {
          "query": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Query",
            "description": "Plain language, parsed into filters by fixed rules (the parsed filters are returned)"
          },
          "filters": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Filters",
            "description": "Filters (see /v1/search docs); override what the query sets"
          },
          "saved_search_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^ss_[0-9a-f]{12}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Saved Search Id"
          }
        },
        "type": "object",
        "title": "SearchRequest"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "HTTPBearer": {
        "type": "http",
        "description": "Helios API key: hk_<key_id>_<secret>",
        "scheme": "bearer"
      }
    }
  },
  "tags": [
    {
      "name": "account"
    },
    {
      "name": "parcels"
    },
    {
      "name": "analyses"
    },
    {
      "name": "runs"
    },
    {
      "name": "webhooks"
    },
    {
      "name": "sources"
    }
  ]
}