{
  "openapi": "3.1.0",
  "info": {
    "title": "Bay Bridge Status API",
    "version": "1.0.0",
    "summary": "Live conditions for the Maryland Chesapeake Bay Bridge (US 50/301) between Annapolis and Kent Island.",
    "description": "Read-only JSON for the Maryland Chesapeake Bay Bridge on US 50/301, which carries traffic between Annapolis and Kent Island, Maryland.\n\nThis is not California’s Bay Bridge and not the Chesapeake Bay Bridge-Tunnel in Virginia.\n\nBayBridgeStatus is an independent site. It is not the Maryland Transportation Authority (MDTA) and does not speak for it. Bridge status here is derived from the MDTA BaySpan recording, MDTA/CHART camera and incident feeds, and nearby weather. Official closures, wind restrictions, and vehicle prohibitions come from MDTA.\n\nWeather near the bridge never establishes a wind restriction. Only MDTA can restrict or prohibit vehicles.\n\nAll wall-clock times refer to America/New_York (the bridge’s timezone, observing DST), not the caller’s.\n\nNo authentication. Please stay within roughly one request per minute per endpoint; every response carries Cache-Control, and honouring it is enough.\n\nVersioning: new endpoints live under `/api/v1/`. Within a version, fields are only ever added, never removed or renamed. A breaking change ships as `/api/v2/`, and the old version keeps working for at least 90 days with `Deprecation` and `Sunset` headers (RFC 9745, RFC 8594) announcing the date. The unversioned endpoints are frozen as v1 and follow the same policy.",
    "contact": {
      "name": "Bay Bridge Status",
      "url": "https://baybridgestatus.com/"
    },
    "license": {
      "name": "Free to use with attribution to baybridgestatus.com",
      "url": "https://baybridgestatus.com/"
    }
  },
  "servers": [
    {
      "url": "https://baybridgestatus.com",
      "description": "Production"
    }
  ],
  "security": [],
  "externalDocs": {
    "description": "Human-readable bridge status, cameras, and crossing guides",
    "url": "https://baybridgestatus.com/"
  },
  "tags": [
    {
      "name": "status",
      "description": "Bridge condition as reported by the MDTA BaySpan recording"
    },
    {
      "name": "traffic",
      "description": "Travel times across the bridge and its approaches"
    },
    {
      "name": "weather",
      "description": "Conditions measured near the bridge"
    },
    {
      "name": "reports",
      "description": "Unverified sightings submitted by visitors"
    },
    {
      "name": "history",
      "description": "Past BaySpan reports by date"
    }
  ],
  "paths": {
    "/api/status": {
      "get": {
        "tags": [
          "status"
        ],
        "operationId": "getStatus",
        "summary": "Current bridge status",
        "description": "The latest parsed BaySpan recordings, newest first, plus separate attempted-call and successful-observation timestamps.\n\n`last_attempted` and legacy `last_checked` record when a call was PLACED, not when a report was successfully parsed. For freshness use `last_confirmed`, which belongs to the newest report and can advance after an unchanged recording is validated. If confirmation metadata is unavailable, use the newest report’s original `date`. A failed call never advances confirmation.",
        "responses": {
          "200": {
            "description": "Newest reports first. An empty `statuses` array with a null `last_checked` means nothing has been recorded, which is unknown — not an all-clear. Absent or null means unknown, never \"clear\" and never zero. Check the timestamp before reporting a condition: a stale reading is not a current all-clear.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/traffic": {
      "get": {
        "tags": [
          "traffic"
        ],
        "operationId": "getTraffic",
        "summary": "Live travel times, both directions",
        "description": "Current and typical driving times over the configured approach corridors, which include the approaches as well as the bridge span itself.\n\nValues are TOTAL minutes for the corridor, not minutes of delay. Delay is `current_traffic - typical_traffic`.\n\nCached for 90 seconds. A direction is null when its upstream routing lookup failed; the other direction may still be present.",
        "responses": {
          "200": {
            "description": "Travel times in minutes. A null direction is unavailable, not free-flowing. Absent or null means unknown, never \"clear\" and never zero. Check the timestamp before reporting a condition: a stale reading is not a current all-clear.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrafficResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          },
          "502": {
            "description": "Both directions failed upstream. No travel time is known.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/traffic/hourly": {
      "get": {
        "tags": [
          "traffic"
        ],
        "operationId": "getHourlyTraffic",
        "summary": "Typical travel time by hour of day",
        "description": "Median travel time for each hour of the day, over the last 30 days, per direction. This is what \"best time to cross\" is built from.\n\nHours are 0–23 in America/New_York. Days are grouped into four buckets because the bridge behaves differently on each: `monthu` (the commute baseline), `fri` (the eastbound getaway), `sat` (the morning run to the shore), `sun` (the drive home). `all` blends every day.\n\nA given hour is null when too few samples were observed to take a median. Do not interpolate across a null hour and do not read it as free-flowing.\n\nSamples are only recorded while someone is using the site, so overnight hours are the sparsest. A bucket with few populated hours should defer to `all`.",
        "responses": {
          "200": {
            "description": "Medians in minutes, by hour and day bucket. Absent or null means unknown, never \"clear\" and never zero. Check the timestamp before reporting a condition: a stale reading is not a current all-clear.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HourlyResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/weather": {
      "get": {
        "tags": [
          "weather"
        ],
        "operationId": "getWeather",
        "summary": "Current conditions near the bridge",
        "description": "Weather observed near the bridge, refreshed about every five minutes.\n\nThis is a weather observation and nothing more. It does not establish a wind restriction, a vehicle prohibition, or a reopening time — only MDTA does. `gustMph` is the number that tracks MDTA wind restrictions most closely, because gusts rather than sustained wind are what trigger them, but a high gust reading is still not a restriction.\n\n`aqi` is the OpenWeatherMap 1–5 index, NOT the US EPA AQI. `pm25` is a real concentration in µg/m³.",
        "responses": {
          "200": {
            "description": "Current conditions. Every measurement is independently nullable. Absent or null means unknown, never \"clear\" and never zero. Check the timestamp before reporting a condition: a stale reading is not a current all-clear.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Weather"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/weather/history": {
      "get": {
        "tags": [
          "weather"
        ],
        "operationId": "getWeatherHistory",
        "summary": "Last 24 hours of recorded conditions",
        "description": "Roughly five-minute samples over the past 24 hours. An empty `points` array means no history is available, not calm weather.",
        "responses": {
          "200": {
            "description": "Oldest first. Absent or null means unknown, never \"clear\" and never zero. Check the timestamp before reporting a condition: a stale reading is not a current all-clear.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WeatherHistoryResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/v1/history": {
      "get": {
        "tags": [
          "history"
        ],
        "operationId": "getHistory",
        "summary": "Past bridge reports by date range",
        "description": "Every saved BaySpan report between two Eastern calendar days, inclusive, oldest first. The same data as https://baybridgestatus.com/history.\n\nUp to 7 days per request; page through longer spans. Days with no saved report are simply absent. Recordings have a gap from January 2025 through January 2026, so those dates return nothing.\n\nA report stays in effect until the next one, so a closure runs from its report to the next non-closed report.",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "First Eastern day, YYYY-MM-DD. Defaults to today."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "Last Eastern day, YYYY-MM-DD, inclusive. Defaults to `from`."
          }
        ],
        "responses": {
          "200": {
            "description": "Reports oldest first. An empty `reports` array means nothing was saved for those days, which is unknown, not an all-clear.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HistoryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad dates: not YYYY-MM-DD, `to` before `from`, in the future, or more than 7 days.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          },
          "502": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/reports": {
      "get": {
        "tags": [
          "reports"
        ],
        "operationId": "getCommunityReports",
        "summary": "Unexpired community reports",
        "description": "Sightings submitted by site visitors that have not yet expired.\n\nThese are UNVERIFIED and crowd-sourced. They are not MDTA statements and carry no official standing. `confirms` and `denies` are visitor votes, not corroboration. Attribute them as reader reports if you repeat them at all.\n\nSubmitting a report is a human-only path and is not part of this contract.",
        "responses": {
          "200": {
            "description": "Active reports, and an empty array when there are none — which means nobody reported anything, not that the bridge is clear.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportsResponse"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    }
  },
  "components": {
    "responses": {
      "Error": {
        "description": "The request could not be completed.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "No such endpoint. Returned by the catch-all if this endpoint is ever retired, in the same envelope as every other error.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message",
              "hint"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "not_found",
                  "bad_request",
                  "upstream_unavailable",
                  "internal_error"
                ],
                "description": "Stable identifier to branch on. Wording of the other fields may change."
              },
              "message": {
                "type": "string",
                "description": "What went wrong."
              },
              "hint": {
                "type": "string",
                "description": "What to do about it."
              }
            }
          }
        }
      },
      "StatusResponse": {
        "type": "object",
        "required": [
          "statuses",
          "last_checked"
        ],
        "properties": {
          "statuses": {
            "type": "array",
            "description": "Newest first. Empty means nothing is recorded, which is unknown.",
            "items": {
              "$ref": "#/components/schemas/StatusItem"
            }
          },
          "last_checked": {
            "type": [
              "string",
              "null"
            ],
            "description": "When the BaySpan line was last DIALLED, ISO 8601. Not proof the newest report was re-confirmed."
          },
          "last_attempted": {
            "type": [
              "string",
              "null"
            ],
            "description": "When the latest call was initiated, ISO 8601. Same meaning as legacy last_checked; never use for freshness."
          },
          "last_confirmed": {
            "type": [
              "string",
              "null"
            ],
            "description": "Conservative observation time of a successful call whose validated transcript matches the newest saved report, ISO 8601. Unchanged reports can advance this without another incident or notification. Null means confirmation metadata is unavailable; use the saved report date conservatively."
          }
        }
      },
      "StatusItem": {
        "type": "object",
        "required": [
          "id",
          "date",
          "audiohash",
          "file",
          "data"
        ],
        "properties": {
          "id": {
            "type": "integer"
          },
          "date": {
            "type": "string",
            "description": "Original observation/save time of this report, ISO 8601. Not updated by confirmation of an unchanged recording. Use last_confirmed when available, otherwise use this date for freshness."
          },
          "audiohash": {
            "type": "string",
            "description": "Fingerprint of the recording. Unchanged between calls means MDTA has not updated the message."
          },
          "file": {
            "type": [
              "string",
              "null"
            ],
            "description": "Recording audio, when retained."
          },
          "data": {
            "$ref": "#/components/schemas/StatusData"
          }
        }
      },
      "StatusData": {
        "type": "object",
        "description": "Parsed from the recording. Fields are absent when the recording did not say.",
        "properties": {
          "status": {
            "type": "string",
            "description": "Transcript of the BaySpan recording."
          },
          "summary": {
            "type": "string",
            "description": "Plain-English summary of the recording."
          },
          "conditional": {
            "type": "string",
            "enum": [
              "ok",
              "hazard",
              "foggy",
              "traffic",
              "construction",
              "windy",
              "closed",
              "issue"
            ],
            "description": "Overall category derived from the recording."
          },
          "faq": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "question",
                "answer"
              ],
              "properties": {
                "question": {
                  "type": "string"
                },
                "answer": {
                  "type": "string"
                }
              }
            }
          },
          "lanes": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/LaneReading"
              },
              {
                "type": "null"
              }
            ],
            "description": "Absent on reports recorded before lane extraction shipped."
          },
          "windStage": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "none",
                  "warning",
                  "limited",
                  "full",
                  "closure"
                ]
              },
              {
                "type": "null"
              }
            ],
            "description": "MDTA wind stage as the recording states it: warning (30-39 mph), limited restrictions (40-49), full restrictions (50+), closure or traffic hold. 'none' means the recording named no stage, not that wind is calm. Null when it could not be read; absent before 2026-10-06."
          }
        }
      },
      "LaneReading": {
        "type": "object",
        "description": "Lane configuration as stated by the recording. The 1952 eastbound span is 2 lanes; the 1973 westbound span is 3.",
        "properties": {
          "eastboundLanes": {
            "type": [
              "number",
              "null"
            ],
            "description": "Lanes running eastbound. Null when the recording did not say."
          },
          "westboundLanes": {
            "type": [
              "number",
              "null"
            ],
            "description": "Lanes running westbound. Null when the recording did not say."
          },
          "spanClosed": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "eastbound",
              "westbound",
              null
            ],
            "description": "A whole span closed, not a single lane."
          },
          "twoWayStated": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "eastbound",
              "westbound",
              null
            ],
            "description": "Span running two-way traffic, when the recording said so outright."
          },
          "transition": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "preparing",
              "ending",
              null
            ],
            "description": "Closed while two-way operation is being set up or taken down."
          }
        }
      },
      "TrafficResponse": {
        "type": "object",
        "required": [
          "eastbound",
          "westbound",
          "history",
          "last_updated"
        ],
        "properties": {
          "eastbound": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TrafficDirection"
              },
              {
                "type": "null"
              }
            ],
            "description": "Toward Kent Island. Null means unavailable, not clear."
          },
          "westbound": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TrafficDirection"
              },
              {
                "type": "null"
              }
            ],
            "description": "Toward Annapolis. Null means unavailable, not clear."
          },
          "history": {
            "type": "object",
            "description": "Recent samples, oldest first, for the last two hours.",
            "required": [
              "eastbound",
              "westbound"
            ],
            "properties": {
              "eastbound": {
                "type": "array",
                "items": {
                  "type": "number"
                }
              },
              "westbound": {
                "type": "array",
                "items": {
                  "type": "number"
                }
              }
            }
          },
          "last_updated": {
            "type": "integer",
            "description": "Unix epoch milliseconds."
          }
        }
      },
      "TrafficDirection": {
        "type": "object",
        "required": [
          "current_traffic",
          "typical_traffic"
        ],
        "properties": {
          "current_traffic": {
            "type": "number",
            "description": "Total minutes for the corridor right now, including approaches."
          },
          "typical_traffic": {
            "type": "number",
            "description": "Total minutes typical for this time of week. Delay is current_traffic minus this."
          }
        }
      },
      "HourlyResponse": {
        "type": "object",
        "required": [
          "hourly",
          "byDay"
        ],
        "properties": {
          "hourly": {
            "type": "array",
            "description": "Equivalent to `byDay.all`. Retained for older clients.",
            "items": {
              "$ref": "#/components/schemas/HourlyPoint"
            }
          },
          "byDay": {
            "type": "object",
            "required": [
              "all",
              "monthu",
              "fri",
              "sat",
              "sun"
            ],
            "description": "24 entries per bucket, hour 0 through 23.",
            "properties": {
              "all": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/HourlyPoint"
                }
              },
              "monthu": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/HourlyPoint"
                }
              },
              "fri": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/HourlyPoint"
                }
              },
              "sat": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/HourlyPoint"
                }
              },
              "sun": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/HourlyPoint"
                }
              }
            }
          }
        }
      },
      "HourlyPoint": {
        "type": "object",
        "required": [
          "hour",
          "eastbound",
          "westbound"
        ],
        "properties": {
          "hour": {
            "type": "integer",
            "minimum": 0,
            "maximum": 23,
            "description": "Hour in America/New_York."
          },
          "eastbound": {
            "type": [
              "number",
              "null"
            ],
            "description": "Median total minutes. Null when too few samples — do not interpolate."
          },
          "westbound": {
            "type": [
              "number",
              "null"
            ],
            "description": "Median total minutes. Null when too few samples — do not interpolate."
          }
        }
      },
      "Weather": {
        "type": "object",
        "description": "An observation near the bridge. Never a wind restriction or a vehicle prohibition.",
        "required": [
          "fetchedAt",
          "summary"
        ],
        "properties": {
          "fetchedAt": {
            "type": "string",
            "description": "ISO 8601 time this site retrieved the reading from OpenWeatherMap. The observation itself can be somewhat older."
          },
          "summary": {
            "type": "string",
            "description": "Plain-English summary of current conditions."
          },
          "conditions": {
            "type": [
              "string",
              "null"
            ],
            "description": "e.g. \"clear sky\", \"haze\", \"smoke\"."
          },
          "icon": {
            "type": [
              "string",
              "null"
            ],
            "description": "OpenWeatherMap icon code, e.g. \"02d\"."
          },
          "tempF": {
            "type": [
              "number",
              "null"
            ],
            "description": "Temperature, °F."
          },
          "feelsLikeF": {
            "type": [
              "number",
              "null"
            ],
            "description": "Apparent temperature, °F."
          },
          "dewpointF": {
            "type": [
              "number",
              "null"
            ],
            "description": "Dew point, °F."
          },
          "humidity": {
            "type": [
              "number",
              "null"
            ],
            "description": "Relative humidity, percent."
          },
          "windMph": {
            "type": [
              "number",
              "null"
            ],
            "description": "Sustained wind, mph."
          },
          "gustMph": {
            "type": [
              "number",
              "null"
            ],
            "description": "Peak gust, mph. Closest to what drives MDTA wind restrictions, but still not one."
          },
          "windDir": {
            "type": [
              "string",
              "null"
            ],
            "description": "Cardinal direction, e.g. \"NW\"."
          },
          "visibilityMiles": {
            "type": [
              "number",
              "null"
            ],
            "description": "Visibility, miles. The source caps near 6.2."
          },
          "rainInHr": {
            "type": [
              "number",
              "null"
            ],
            "description": "Rain in the past hour, inches. Null when not raining."
          },
          "aqi": {
            "type": [
              "number",
              "null"
            ],
            "description": "OpenWeatherMap index, 1 (Good) to 5 (Very Poor). NOT the US EPA AQI."
          },
          "aqiCategory": {
            "type": [
              "string",
              "null"
            ],
            "description": "Good / Fair / Moderate / Poor / Very Poor."
          },
          "pm25": {
            "type": [
              "number",
              "null"
            ],
            "description": "PM2.5 concentration, µg/m³."
          },
          "sunriseAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Today’s sunrise at the bridge, ISO 8601."
          },
          "sunsetAt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Today’s sunset at the bridge, ISO 8601."
          }
        }
      },
      "WeatherHistoryResponse": {
        "type": "object",
        "required": [
          "points"
        ],
        "properties": {
          "points": {
            "type": "array",
            "description": "Oldest first. Empty means no history, not calm weather.",
            "items": {
              "type": "object",
              "required": [
                "ts"
              ],
              "properties": {
                "ts": {
                  "type": "integer",
                  "description": "Unix epoch milliseconds."
                },
                "tempF": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "Temperature, °F."
                },
                "windMph": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "Sustained wind, mph."
                },
                "gustMph": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "Peak gust, mph."
                },
                "visibilityMiles": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "Visibility, miles."
                },
                "humidity": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "Relative humidity, percent."
                }
              }
            }
          }
        }
      },
      "HistoryResponse": {
        "type": "object",
        "required": [
          "from",
          "to",
          "reports"
        ],
        "properties": {
          "from": {
            "type": "string",
            "format": "date",
            "description": "First Eastern day covered."
          },
          "to": {
            "type": "string",
            "format": "date",
            "description": "Last Eastern day covered (capped at today)."
          },
          "reports": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "date",
                "status",
                "summary",
                "transcript",
                "windStage",
                "lanes",
                "audio",
                "media"
              ],
              "properties": {
                "id": {
                  "type": "integer"
                },
                "date": {
                  "type": "string",
                  "description": "When the report was saved, ISO 8601 UTC."
                },
                "status": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "ok",
                    "hazard",
                    "foggy",
                    "traffic",
                    "construction",
                    "windy",
                    "closed",
                    "issue",
                    null
                  ],
                  "description": "Overall category."
                },
                "summary": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Plain-English summary."
                },
                "transcript": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Transcript of the BaySpan recording."
                },
                "windStage": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Same meaning as StatusData.windStage."
                },
                "lanes": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/LaneReading"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "audio": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Recording audio, when retained."
                },
                "media": {
                  "type": "array",
                  "description": "Camera stills or clips saved with the report.",
                  "items": {
                    "type": "object",
                    "properties": {
                      "url": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "image",
                          "video"
                        ]
                      },
                      "alt": {
                        "type": "string"
                      },
                      "savedAt": {
                        "type": "integer",
                        "description": "Unix epoch milliseconds."
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ReportsResponse": {
        "type": "object",
        "required": [
          "reports"
        ],
        "properties": {
          "reports": {
            "type": "array",
            "description": "Unverified visitor submissions. Empty means nobody reported, not all-clear.",
            "items": {
              "type": "object",
              "required": [
                "id",
                "status",
                "direction",
                "created_at",
                "expires_at",
                "confirms",
                "denies"
              ],
              "properties": {
                "id": {
                  "type": "integer"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "ok",
                    "hazard",
                    "foggy",
                    "traffic",
                    "construction",
                    "windy",
                    "closed",
                    "issue"
                  ],
                  "description": "What the visitor reported."
                },
                "direction": {
                  "type": "string",
                  "enum": [
                    "eb",
                    "wb",
                    "both"
                  ],
                  "description": "eb eastbound, wb westbound, both directions."
                },
                "created_at": {
                  "type": "integer",
                  "description": "Unix epoch milliseconds."
                },
                "expires_at": {
                  "type": "integer",
                  "description": "Unix epoch milliseconds."
                },
                "confirms": {
                  "type": "integer",
                  "description": "Visitor votes agreeing. Not corroboration."
                },
                "denies": {
                  "type": "integer",
                  "description": "Visitor votes disagreeing."
                },
                "image_keys": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}