{"openapi":"3.1.0","info":{"title":"droply API","version":"1.0.0","description":"Put HTML pages, websites and files online as shareable links (name.droply.page), then manage them: update content, set passwords, connect custom domains and read stats. Included on the Plus plan and above. Create an API key in the droply dashboard under Account → API.","contact":{"email":"hi@droply.so","url":"https://droply.so/contact"},"termsOfService":"https://droply.so/terms"},"externalDocs":{"description":"API documentation","url":"https://docs.droply.so"},"servers":[{"url":"https://droply.so/api/v1"}],"security":[{"apiKey":[]}],"paths":{"/me":{"get":{"operationId":"getAccount","summary":"Check the API key: account, plan and limits","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"plan":{"type":"string","example":"plus"},"projects":{"type":"object","properties":{"used":{"type":"integer"},"limit":{"type":["integer","null"],"description":"null means unlimited"}}},"storageLimitBytes":{"type":"integer"},"rateLimits":{"type":"object","properties":{"requestsPerMinute":{"type":"integer"},"uploadsPerMinute":{"type":"integer"},"uploadsPerDay":{"type":"integer"}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/sites":{"get":{"operationId":"listSites","summary":"List your live projects","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"sites":{"type":"array","items":{"$ref":"#/components/schemas/Site"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"createSite","summary":"Publish files and get a link","description":"Send one HTML file, several files, or a ZIP of a whole website (with index.html). The project is live right away.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"string","format":"binary"},"description":"One or more files, or a single .zip"},"name":{"type":"string","description":"Optional address: name.droply.page (3-40 lowercase letters, numbers and dashes)"},"password":{"type":"string","description":"Optional password visitors must enter"}},"required":["files"]}}}},"responses":{"201":{"description":"Published","content":{"application/json":{"schema":{"type":"object","properties":{"site":{"$ref":"#/components/schemas/Site"}},"required":["site"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"413":{"$ref":"#/components/responses/TooLarge"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/sites/{id}":{"parameters":[{"name":"id","in":"path","required":true,"description":"The project id (from list or create)","schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"getSite","summary":"Get one project, including its files","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"site":{"$ref":"#/components/schemas/Site"}},"required":["site"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"patch":{"operationId":"updateSite","summary":"Rename, set or remove the password, hide from search engines, turn downloads off","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New address. The old link stops working."},"password":{"type":["string","null"],"description":"Set a password, or null to make the project public"},"noIndex":{"type":"boolean","description":"Ask search engines not to list the project"},"downloadsDisabled":{"type":"boolean","description":"Stop visitors downloading the files (Pro and up)"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"site":{"$ref":"#/components/schemas/Site"}},"required":["site"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}},"delete":{"operationId":"deleteSite","summary":"Move a project to the trash (restorable for 7 days)","parameters":[{"name":"permanent","in":"query","required":false,"description":"true deletes it for good","schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"},"permanent":{"type":"boolean"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/sites/{id}/files":{"parameters":[{"name":"id","in":"path","required":true,"description":"The project id (from list or create)","schema":{"type":"string","format":"uuid"}}],"put":{"operationId":"replaceSiteFiles","summary":"Replace all of a project's files (the link stays the same)","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"string","format":"binary"},"description":"The new files, or a single .zip"}},"required":["files"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"site":{"$ref":"#/components/schemas/Site"}},"required":["site"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"413":{"$ref":"#/components/responses/TooLarge"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"addSiteFiles","summary":"Add files to a project (same name overwrites)","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"string","format":"binary"},"description":"Files to add"}},"required":["files"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"site":{"$ref":"#/components/schemas/Site"}},"required":["site"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"413":{"$ref":"#/components/responses/TooLarge"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/sites/{id}/stats":{"parameters":[{"name":"id","in":"path","required":true,"description":"The project id (from list or create)","schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"getSiteStats","summary":"Views, visitors and emails captured, plus top sources, countries and devices","parameters":[{"name":"days","in":"query","required":false,"description":"How many days back (1-90, default 14)","schema":{"type":"integer","minimum":1,"maximum":90,"default":14}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"days":{"type":"integer"},"views":{"type":"integer","description":"Views in the period"},"visitors":{"type":"integer","description":"Unique visitors per day, added up over the period"},"previousViews":{"type":"integer","description":"Views in the same number of days before the period"},"totalViews":{"type":"integer","description":"All time"},"leads":{"type":"integer","description":"Emails captured in the period"},"topSources":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"views":{"type":"integer"}}},"description":"All time"},"topCountries":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"ISO country code"},"views":{"type":"integer"}}},"description":"All time"},"mobileShare":{"type":["integer","null"],"description":"Percent of views on phones and tablets, all time"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/sites/{id}/domain":{"parameters":[{"name":"id","in":"path","required":true,"description":"The project id (from list or create)","schema":{"type":"string","format":"uuid"}}],"get":{"operationId":"getSiteDomain","summary":"Status of the project's custom domain (DNS and HTTPS)","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":["string","null"]},"dnsConnected":{"type":"boolean"},"https":{"type":"string"},"dnsRecord":{"$ref":"#/components/schemas/DnsRecord"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}},"put":{"operationId":"setSiteDomain","summary":"Connect a custom domain","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","example":"files.example.com"}},"required":["domain"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string"},"dnsRecord":{"$ref":"#/components/schemas/DnsRecord"},"next":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}},"delete":{"operationId":"removeSiteDomain","summary":"Disconnect the custom domain","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"null"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/RateLimited"}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Your droply API key (starts with drp_). The X-API-Key header also works."}},"schemas":{"Site":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string","description":"The address: name.droply.page","example":"spring-menu"},"url":{"type":"string","format":"uri","example":"https://spring-menu.droply.page"},"customDomain":{"type":["string","null"],"example":"menu.example.com"},"access":{"type":"string","description":"public, password, email-capture or email-protect","example":"public"},"sizeBytes":{"type":["integer","null"]},"views":{"type":["integer","null"]},"createdAt":{"type":["string","null"],"format":"date-time"},"updatedAt":{"type":["string","null"],"format":"date-time"},"files":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"size":{"type":["integer","null"]}}}}},"required":["id","name","url","access"]},"DnsRecord":{"type":"object","properties":{"type":{"type":"string","example":"CNAME"},"name":{"type":"string"},"value":{"type":"string","example":"proxy.droply.so"}}},"Error":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}},"responses":{"BadRequest":{"description":"The request is missing something; the message says what","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Missing, invalid or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"Not allowed on your plan (the API needs Plus or above), or a plan limit is reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such project in your account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooLarge":{"description":"Over your plan's upload or storage limit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Too many requests; see the Retry-After header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}