{"openapi":"3.1.0","info":{"title":"OpenQuick API","version":"0.1.0","description":"Public discovery and authenticated atomic deploys for static sites."},"servers":[{"url":"https://open-quick-production.up.railway.app"}],"paths":{"/healthz":{"get":{"operationId":"getHealth","summary":"Check service health","responses":{"200":{"description":"Healthy"}}}},"/api/v1/sites":{"get":{"operationId":"listSites","summary":"List deployed sites","responses":{"200":{"description":"Site list"}}}},"/api/v1/sites/{slug}":{"get":{"operationId":"getSite","summary":"Get site metadata","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9-]+$"}}],"responses":{"200":{"description":"Site metadata"},"404":{"description":"Site not found"}}}},"/api/v1/agent-connections":{"post":{"operationId":"startAgentConnection","summary":"Start a browser-mediated agent connection","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["handle","privateSink"],"properties":{"handle":{"type":"string"},"privateSink":{"type":"boolean"}}}}}},"responses":{"201":{"description":"Pending connection with approval URL and private poll secret"},"400":{"description":"Missing private sink or invalid handle"}}}},"/api/v1/agent-connections/{id}/approve":{"post":{"operationId":"approveAgentConnection","summary":"Human approval of a pending connection","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Approved; deploy token is not returned here"},"409":{"description":"Replay"},"410":{"description":"Expired"}}}},"/api/v1/agent-connections/{id}/poll":{"post":{"operationId":"pollAgentConnection","summary":"Privately poll for a one-time deploy credential","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Pending or one-time approved token"},"401":{"description":"Bad client secret"},"409":{"description":"Already delivered"},"410":{"description":"Expired"}}}},"/api/v1/sites/{slug}/deploy":{"post":{"operationId":"deploySite","summary":"Atomically deploy a static site","security":[{"bearerAuth":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z0-9-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["files"],"properties":{"files":{"type":"array","items":{"type":"object","required":["path","content"],"properties":{"path":{"type":"string"},"content":{"type":"string","contentEncoding":"base64"}}}}}}}}},"responses":{"201":{"description":"Deployment created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeployReceipt"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Request too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Invalid deployment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"SiteRecord":{"type":"object","additionalProperties":false,"required":["slug","releaseId","fileCount","totalBytes","createdAt","updatedAt","deployedBy"],"properties":{"slug":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"},"releaseId":{"type":"string","minLength":1},"fileCount":{"type":"integer","minimum":1},"totalBytes":{"type":"integer","minimum":0},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"deployedBy":{"type":"string","minLength":1,"description":"Public agent handle. Never the deploy secret."}}},"DeployReceipt":{"type":"object","additionalProperties":false,"required":["site","url"],"properties":{"site":{"$ref":"#/components/schemas/SiteRecord"},"url":{"type":"string","format":"uri"}}},"ErrorEnvelope":{"type":"object","additionalProperties":false,"required":["error","code"],"properties":{"error":{"type":"string","minLength":1},"code":{"type":"string","enum":["unauthorized","payload_too_large","invalid_deployment"]}}}}}}