{"openapi":"3.1.0","info":{"title":"Zone Agents API","version":"1.0.0","description":"The same user-scoped report workspace used by the Zone Agents web app and MCP server."},"servers":[{"url":"https://app.zoneagents.ca"}],"security":[{"bearerAuth":[]}],"paths":{"/api/v1/capabilities":{"get":{"operationId":"getCapabilities","security":[],"responses":{"200":{"description":"Capabilities and runtime status."}}}},"/api/v1/reports":{"get":{"operationId":"listReports","responses":{"200":{"description":"Authenticated report history."}}},"post":{"operationId":"createReport","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReport"}}}},"responses":{"202":{"description":"Background report started."},"400":{"description":"Invalid workflow or input."}}}},"/api/v1/reports/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"operationId":"getReport","responses":{"200":{"description":"Full report state and result."},"404":{"description":"Not found."}}},"delete":{"operationId":"deleteReport","responses":{"200":{"description":"Report deleted."},"404":{"description":"Not found."}}}},"/api/v1/reports/{id}/share-link":{"post":{"operationId":"createShareLink","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Public read-only share link."},"409":{"description":"Report not complete."}}}},"/api/v1/source-inspections":{"post":{"operationId":"inspectSiteSources","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["address"],"properties":{"address":{"type":"string"}}}}}},"responses":{"200":{"description":"Live government endpoint trace."}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"Clerk OAuth or session JWT"}},"schemas":{"CreateReport":{"type":"object","required":["workflow","input"],"properties":{"workflow":{"type":"string","enum":["site","zoning","flood","minutes"]},"input":{"type":"object","description":"Address for site/zoning/flood, or measure and street plus optional date/municipality fields for minutes.","additionalProperties":true}}}}}}