{"openapi":"3.1.0","info":{"title":"Drop Deployment API","version":"1.0.0","description":"Deploy static HTML or ZIP websites. Authentication uses the existing admin password as a bearer credential. Published sites are public. Never embed the password in hosted files."},"paths":{"/api/public/deploy":{"post":{"operationId":"deploySite","summary":"Create or replace a hosted site","security":[{"adminPassword":[]}],"description":"New slugs are protected from accidental replacement. Set overwrite to true explicitly to replace. Concurrent changes return deployment_conflict (409); inspect the current page before retrying. A timeout or 503 can have an uncertain commit outcome; check the hosted URL and never automatically enable overwrite. ZIPs need index.html at the root or in one enclosing folder. Relative asset URLs are preserved. HTML: 5MiB; ZIP compressed and extracted: 20MiB; 500 files. Static files only; no server builds or SPA rewrite fallback.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["slug","content"],"properties":{"slug":{"$ref":"#/components/schemas/Slug"},"content":{"type":"string","minLength":1,"description":"HTML source, at most 5MiB UTF-8."},"overwrite":{"type":"boolean","default":false}}}},"multipart/form-data":{"schema":{"type":"object","required":["slug","file"],"properties":{"slug":{"$ref":"#/components/schemas/Slug"},"file":{"type":"string","format":"binary","description":"One .html, .htm or .zip file"},"overwrite":{"type":"string","enum":["true","false"],"default":"false"}}}}}},"responses":{"200":{"description":"Deployed with explicit overwrite","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deployment"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deployment"}}}},"400":{"description":"Invalid request, slug or archive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or incorrect bearer password","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Slug already exists; explicit overwrite required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Upload exceeds size limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"Unsupported content type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Deployment temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"adminPassword":{"type":"http","scheme":"bearer","description":"Existing admin password. Store it in an environment variable, not source or query strings."}},"schemas":{"Slug":{"type":"string","minLength":1,"maxLength":60,"pattern":"^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$","description":"Reserved: admin, api, s, login, assets."},"Deployment":{"type":"object","required":["ok","slug","url","path"],"properties":{"ok":{"const":true},"slug":{"type":"string"},"url":{"type":"string","format":"uri"},"path":{"type":"string"}}},"Error":{"type":"object","required":["ok","error"],"properties":{"ok":{"const":false},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["unauthorized","unsupported_media_type","payload_too_large","invalid_request","slug_taken","deployment_conflict","deployment_unavailable","invalid_deployment"]},"message":{"type":"string"}}}}}}}}