{"openapi":"3.1.0","info":{"title":"putlive API","version":"1.0.0","summary":"Publish what an AI agent made and get a link.","description":"putlive hosts the work of AI agents (a page, a site, a file) and returns a link. The link is private by default: the generated address is long and random, and search engines are told to skip it (an address made from a name of the owner's own can be guessed). Wider access is set only by an explicit request.\n\nSign in with an e-mailed 8-digit code (`POST /v1/auth/code`, then `POST /v1/auth/token`) and send the key as `Authorization: Bearer <key>`. A guide written for agents, with what every error code means and what to do, is at https://putlive.dev/llms.txt.\n\nRequest budgets: 120 a minute per key for everything except uploads, and 600 a minute for the whole account across all its keys; 1200 a minute for uploads (`PUT`, `PATCH` and `GET /v1/uploads/...`). Over a budget the answer is `rate_limited` with `Retry-After`.\n\nEvery answer of `/v1` is `Cache-Control: no-store`. Every error has the shape of `ApiErrorBody`; match on `error.code`, never on the message."},"servers":[{"url":"https://api.putlive.dev","description":"The API"}],"tags":[{"name":"auth","description":"Sign in by an e-mailed code. No key needed."},{"name":"account","description":"The account behind a key."},{"name":"sites","description":"Publish, update, protect and remove sites."},{"name":"reports","description":"Report a published address. No key needed."},{"name":"anonymous","description":"Publish a page without an account, where this service offers it. No key needed."}],"paths":{"/v1/auth/code":{"post":{"operationId":"requestSignInCode","tags":["auth"],"summary":"E-mail a sign-in code","description":"Sends a 8-digit code to the address. The code works once, for 10 minutes; a new code replaces the one that is waiting.\n\nYou make `request_id` yourself: 22 characters of `A-Z`, `a-z`, `0-9`, `-` and `_` (16 random bytes in base64url, without the padding), a new one for each request for a code. You send the same value again when you trade the code for a key (`POST /v1/auth/token`): a code is worth nothing without the value of the request that asked for it, so a code that reaches somebody else cannot be used. A request without it, or with a malformed one, is refused with `invalid_request`: the copy of the skill or of the command line that sent it is older than this service and has to be updated.\n\nThe answer is 204 and has nothing in it. Where sign-up is open it is the same for every well-formed address, whether or not the address has an account (what depends on the address is decided when the code is traded, after the code has been shown). Where sign-up is by invitation, an address that has no account and sends no valid `invite` is refused with `forbidden` and the hint `invite required`; where sign-up is open `invite` is ignored.\n\nAt most 5 codes an hour are sent to one address. Open to everybody: no key.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignInCodeRequest"},"example":{"email":"person@example.com","request_id":"EXAMPLE-REQUEST-ID-22","invite":"EXAMPLE-INVITE-CODE"}}}},"responses":{"204":{"description":"If the address can sign in, a mail with the code is on its way."},"400":{"$ref":"#/components/responses/Error400"},"403":{"$ref":"#/components/responses/Error403"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}},"x-error-codes":["invalid_request","forbidden","too_large","rate_limited","unavailable"]}},"/v1/auth/token":{"post":{"operationId":"redeemSignInCode","tags":["auth"],"summary":"Trade the e-mailed code for an API key","description":"The key is in this answer and nowhere else: it is shown once and stored only as a hash. The first use of a right code for an address that has no account creates the account (Free plan): by invitation it spends the invite that was valid when the code was asked for; where sign-up is open it needs none, unless the service cannot make new accounts right now. Then the answer is `rate_limited` with `Retry-After` and the code is used up (ask for a new one when the wait is over), or `unavailable` while the storage is nearly full (the code is not used up: call again later). An address that has an account is never refused for that reason.\n\nSend the same `request_id` as the request for the code. A code with another value is answered exactly like a wrong code (`unauthorized`) and uses one of its looks.\n\nThe code is read as people copy it (`0000 0000` or `0000-0000`). A code is looked at 5 times and then dies; ask for a new one. A wrong, expired or used code is always the same `unauthorized`.\n\nAn account holds at most 20 active keys: at that number the answer is `limit_exceeded` (`api_keys`) and the code is not used up; revoke a key on the keys page of the dashboard and call again with the same code (it works for 10 minutes and 5 looks).\n\nOpen to everybody: no key.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenRequest"},"example":{"email":"person@example.com","code":"0000 0000","request_id":"EXAMPLE-REQUEST-ID-22","key_name":"my agent"}}}},"responses":{"200":{"description":"The new API key and the account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"},"example":{"api_key":"ah_EXAMPLE000000000000000000000000000000000","account":{"id":"00000000-0000-4000-8000-000000000000","email":"person@example.com","plan":"free"}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}},"x-error-codes":["invalid_request","unauthorized","forbidden","limit_exceeded","too_large","rate_limited","unavailable"]}},"/v1/me":{"get":{"operationId":"getAccount","tags":["account"],"summary":"The account behind the key","description":"The account, the limits of its plan and what it holds now. Counts against the per-key request budget like every other call.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"The account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"401":{"$ref":"#/components/responses/Error401"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}},"x-error-codes":["unauthorized","rate_limited","unavailable"]}},"/v1/usage":{"get":{"operationId":"getUsage","tags":["account"],"summary":"What the account uses against its plan","description":"Sites, storage, and the transfer of this UTC month. `transfer.resetsAt` is the first moment of the next month. The transfer is counted from the edge's access log every ten minutes, so it can be that much behind. When the monthly transfer of a Free account is used up, its live sites answer visitors with 509 until `resetsAt`. An account that is not on the Free plan is served longer: its live sites answer with 509 only when the transfer of the month reaches three times `transfer.limitBytes`, until `resetsAt` or until that limit grows; the stop is lifted at the next count, which can be 30 minutes behind. The `limitBytes` of storage and transfer are the account's own: the plan's and the room added to the account, so they can be bigger than the plan's name suggests.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"The numbers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"}}}},"401":{"$ref":"#/components/responses/Error401"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}},"x-error-codes":["unauthorized","rate_limited","unavailable"]}},"/v1/sites":{"get":{"operationId":"listSites","tags":["sites"],"summary":"The sites of the account","description":"The sites that are not deleted, newest first.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"The sites.","content":{"application/json":{"schema":{"type":"object","required":["sites"],"additionalProperties":false,"properties":{"sites":{"type":"array","items":{"$ref":"#/components/schemas/Site"}}}}}}},"401":{"$ref":"#/components/responses/Error401"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}},"x-error-codes":["unauthorized","rate_limited","unavailable"]},"post":{"operationId":"createSite","tags":["sites"],"summary":"Publish a new site","description":"Creates a site and its first release. The address is random and secret (`access.mode` is `link`, `noindex`) unless the request says otherwise.\n\nTwo ways: list `files` (path, size, sha256) and upload each with `PUT /v1/uploads/{releaseId}/{path}`, then `POST /v1/releases/{id}/finalize`; or send only `inlineFiles` (text, 256 KB together) and the request is finalized for you. Both together are allowed: the inline files are stored now, the others are uploaded.\n\nEvery release of a Free account is checked before it is served. It may be held for a person (`site.status` `pending_review`) or refused (`rejected`, with `reasons`).\n\nLimits: 2500 files, a body of 2 MB, 4 publications in 24 hours for each site the plan allows (20 on Free; every release counts, the first of a site too), and the limits of the plan.","security":[{"bearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/Wait"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishRequest"},"example":{"title":"Quarterly report","inlineFiles":[{"path":"index.html","content":"<h1>Hello</h1>"}]}}}},"responses":{"200":{"description":"The request carried only `inlineFiles`, so it was finalized in the same call and the answer is settled. `status` is one of `live`, `pending_review`, `rejected`, `superseded`. `live`: The release is served. `pending_review`: The release is held for a person; `reasons` says why. Nothing to retry: tell the user that a person will look at it and that the decision comes by mail. If nobody has looked within 72 hours the publication is refused. An update can then be published again; a first publication leaves a `rejected` site that cannot be updated, so the files are published again as a new site and the refused site can be deleted to free its place. For an update, the version that was live keeps serving meanwhile. `rejected`: The safety checks refused the release; `reasons` says why. Do not send the same files again. `superseded`: A newer release went live first, so this one is not served.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeResult"}}}},"201":{"description":"The request listed `files`: this is the ticket. Send each file named in `uploads`, whole with `PUT` or in parts with `PATCH` (see `PUT /v1/uploads/{releaseId}/{path}`), then POST `finalizeUrl`. The upload session ends at `expiresAt` unless uploads keep arriving: it is moved to 30 minutes after every upload request that passes its checks, and it ends 24 hours after the release was created whatever arrives. Files the site already holds are not listed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishTicket"}}}},"202":{"description":"Finalized, but the answer is not settled after the wait (`wait`, default 20, at most 60 seconds). `status` is `checking`. `checking`: The checks are still running. Call `POST /v1/releases/{id}/finalize` again with the `release.id` of this answer; it is safe to repeat.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeResult"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}},"x-error-codes":["invalid_request","unauthorized","forbidden","conflict","limit_exceeded","too_large","rate_limited","unavailable"]}},"/v1/sites/import":{"post":{"operationId":"importSite","tags":["sites"],"summary":"Publish one public file by its web address","description":"Takes the address of ONE public file and publishes it as a site: a new one, or a new version of the site `siteId` names. The API never connects to the address: the serving side of the service fetches the file, under its own rules (a web address with the port of its scheme, an address that is public, a few redirects, thirty seconds, at most the account's file size and 100 MB, an archive or a kind of file the service does not serve refused). An HTML page becomes `index.html`; another file keeps its name. The file then goes through the same checks as an upload, and the answer is that of a publication that carried its files inline: `?wait=` seconds for the checks, 200, or 202 while they still run, with two more fields, `file` and `warnings`.\n\n`file` says what was imported: its `name` on the site, its `size` in bytes and its `contentType`, as the service read the file. Look at it: a link that needs a sign-in hands out the sign-in page, an HTML page, which is not what the person expected.\n\n`warnings` holds `relative_files` when the page refers to other files by a relative address: those files were NOT imported, so the page may look incomplete.\n\nOnly where the instance has switched it on (`not_enabled` with the words \"Import by link is not switched on for this service yet.\" otherwise; do not retry) and only on an account whose plan includes it (`forbidden` with \"Import by link is not part of this account's plan.\"). Both refusals carry the same `hint`, which says what to do instead: \"Publish the file itself instead: an agent sends its content, and an assistant in a chat makes an upload link for a file that is not text.\" A link into an assistant's own viewer is refused with \"This link opens a page inside an assistant's own viewer, not a file.\", also when the address REDIRECTS there (an HTTP redirect, within the few the service follows: a short link, or an older address of the same assistant): ask the assistant for the page's code, or download the file, then publish that. A page that sends a browser on by its own markup or script is an ordinary page, and is fetched as it is. Every other refusal of the fetch is `invalid_request` with ONE sentence for its reason and the hint to download the file and publish it as a file (never a word of the other server's); a file over the size is `limit_exceeded` with `limit` `file_size`.\n\nAn account may start 30 imports a day (a window that starts at 00:00 UTC), a request whose address was handed to the serving side counting also when the address or the file was then refused or no answer came, because this number is what bounds how much an account can try (a request refused before its address was handed over, or that found the serving side busy or switched off, costs none): past it the answer is `rate_limited` with `Retry-After`. Another import running at the same moment is `rate_limited` with a wait of a few seconds, and costs no place.","security":[{"bearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/Wait"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportRequest"},"example":{"url":"https://files.example.com/report.pdf","title":"The report"}}}},"responses":{"200":{"description":"The file was fetched and published and the answer is settled. `status` is one of `live`, `pending_review`, `rejected`, `superseded`. `live`: The release is served. `pending_review`: The release is held for a person; `reasons` says why. Nothing to retry: tell the user that a person will look at it and that the decision comes by mail. If nobody has looked within 72 hours the publication is refused. An update can then be published again; a first publication leaves a `rejected` site that cannot be updated, so the files are published again as a new site and the refused site can be deleted to free its place. For an update, the version that was live keeps serving meanwhile. `rejected`: The safety checks refused the release; `reasons` says why. Do not send the same files again. `superseded`: A newer release went live first, so this one is not served.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportResult"}}}},"202":{"description":"Fetched and published, but the answer is not settled after the wait (`wait`, default 20, at most 60 seconds). `status` is `checking`. `checking`: The checks are still running. Call `POST /v1/releases/{id}/finalize` again with the `release.id` of this answer; it is safe to repeat.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportResult"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"},"501":{"$ref":"#/components/responses/Error501"},"503":{"$ref":"#/components/responses/Error503"}},"x-error-codes":["invalid_request","unauthorized","forbidden","not_found","conflict","limit_exceeded","too_large","pending_review","rejected","rate_limited","unavailable","not_enabled"]}},"/v1/sites/{id}":{"get":{"operationId":"getSite","tags":["sites"],"summary":"One site","description":"A site of the account. Somebody else's site, a deleted one and an id that is not a UUID are all `not_found`.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The id of the site.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The site.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Site"}}}},"401":{"$ref":"#/components/responses/Error401"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}},"x-error-codes":["unauthorized","not_found","rate_limited","unavailable"]},"patch":{"operationId":"updateSite","tags":["sites"],"summary":"Give a site a name for its address, give it up, or ask for a mail at the next opening","description":"The body holds `name`, `notifyNextOpen`, or both (at least one; an unknown key is refused). `notifyNextOpen: true` asks to be mailed the next time the site is opened, once: the mail names the site and the 10 minutes in which it was opened, and nothing about the visitor. Openings are counted in steps of 10 minutes, and the mail is for the first step that begins after the request: an opening in the same step as the request does not send it. Asking again later asks for the next mail. Only accounts whose plan includes opens may ask (`forbidden`, \"Opens are not part of this account's plan.\", before anything else in the request is changed). A site of such a plan is asked for by itself when it goes live for the first time: the first opening that can send the mail is one in a step that begins at least 10 minutes after the site went live.\n\nSets `name`, a name of the account's own for the address: the site then answers on `<name>.putlive.page` as well, and the generated address keeps working. `{\"name\": null}` gives the name up. Only accounts whose plan includes a name of their own may set one (`forbidden` otherwise); giving it up is always allowed.\n\nThe name is trimmed and lower-cased, 3 to 40 letters, digits and hyphens, with no hyphen at either end and no two in a row, and without a word of the list of refused ones (`invalid_request`, with the rule in `error.hint`). A name that is the address of any site, or that another account holds (also one that account gave up), is `conflict`; the account that holds a name may set it on another of its sites, and the first site stops answering on it. Changes of a name are limited per account per day (`rate_limited`).\n\nThe change is written first and the storage behind the service is told second; when it cannot be told nothing changes and the answer is `unavailable`: repeat the same call. The answer is `{ \"site\": ... }`: `site.url` is the name's address, `site.addresses` lists every address, best first.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The id of the site.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteNameRequest"},"example":{"name":"quarterly-report"}}}},"responses":{"200":{"description":"The site with its new name, or with the mail asked for (`site.opens.notice` is `armed`).","content":{"application/json":{"schema":{"type":"object","required":["site"],"additionalProperties":false,"properties":{"site":{"$ref":"#/components/schemas/Site"}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}},"x-error-codes":["invalid_request","unauthorized","forbidden","not_found","conflict","too_large","rate_limited","unavailable"]},"delete":{"operationId":"deleteSite","tags":["sites"],"summary":"Delete a site","description":"The site stops answering and its files are removed; the address is never given to anybody else. A site that is switched off (`quarantined`), waits for a person (`pending_review`, or an update held for a person) or has a report that its sender confirmed and we have not decided yet is NOT deleted: the answer is `conflict` with a message that says why and what to do (reply to the e-mail about the site; delete it once the case is closed), and its files are kept. Do not retry it. When the storage cannot be reached the answer is `unavailable`: repeat the same call.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The id of the site.","schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"The site is deleted."},"401":{"$ref":"#/components/responses/Error401"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}},"x-error-codes":["unauthorized","not_found","conflict","rate_limited","unavailable"]}},"/v1/sites/{id}/opens":{"get":{"operationId":"getSiteOpens","tags":["sites"],"summary":"How often a site was opened","description":"The last 90 days: a count per day (`days`, newest first; a day on which the site was not opened is not listed) and, for a site that is limited to a list of e-mail addresses (`mode` `email`), `recipients`: which address of the list signed in, how many times, and when first and last (at most 500, the latest first).\n\nAn opening is a browser's navigation to a page of the site that was allowed, as far as the request can tell: a reload counts, the owner's own visits count, a request that does not look like a browser's does not, and a page that does not exist does not. It is never a count of people. Nothing about a visitor is kept for this: no address, no browser, no path; for an e-mail site only the address the owner put on the list.\n\nOnly accounts whose plan includes opens (`forbidden`, \"Opens are not part of this account's plan.\"). A site that is not the account's is `not_found`: nobody but the owner reads a site's counts.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The id of the site.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The counts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteOpens"}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}},"x-error-codes":["unauthorized","forbidden","not_found","rate_limited","unavailable"]}},"/v1/sites/{id}/access":{"patch":{"operationId":"updateSiteAccess","tags":["sites"],"summary":"Who may open a site","description":"Changes the mode, the password, the e-mail list, the expiry or the revocation of a site. What the request leaves out stays; what the new mode does not use is cleared. The edge is told first: when it cannot take the change nothing changes and the answer is `unavailable`.\n\n`link` (default): anyone who has the address; search engines are told to skip it. `password`: a visitor asks for it (8 to 256 characters). `email`: a visitor gets a code by mail if the address is on the list (5 entries on Free, 1000 at most). `public`: searchable, no secret in the link; not on the Free plan (`forbidden`). Widening access is the user's decision, not the agent's.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The id of the site.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequest"},"example":{"mode":"email","emails":["person@example.com"],"expiresAt":"2030-01-01T00:00:00Z"}}}},"responses":{"200":{"description":"The site with its new access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Site"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}},"x-error-codes":["invalid_request","unauthorized","forbidden","not_found","conflict","limit_exceeded","too_large","rate_limited","unavailable"]}},"/v1/sites/{id}/domains":{"post":{"operationId":"addDomain","tags":["sites"],"summary":"Add a domain of your own to a site","description":"Adds a domain name of the account's own to the site (`example.com`, `www.example.com`). The name is read as a lower-case name: capitals, one trailing dot and a whole address (its host is taken) are accepted, letters outside ASCII are kept as their ASCII form. An IP address, one word, a name with a star and a name of this service itself are `invalid_request`, and `error.hint` says what to type.\n\nThe domain WAITS (`status: \"pending\"`) and its DNS is looked at once, right away: `domain.records` are the DNS records its owner makes at the place that holds the name (a TXT record that shows the name is theirs, and the record that points it here: a CNAME, or an A record for the bare name of a zone), and `domain.problems` say what the look found. A name whose records are already right is connected by that look. It is looked at again by itself, with growing pauses, for a time after it was added; `POST /v1/sites/{id}/domains/{domainId}/check` asks for a look at once. A name and its `www.` twin share one TXT record and count as ONE place of the plan's number.\n\nOnly accounts whose plan includes domains of their own may add one (`forbidden` otherwise), and only up to the account's number (the plan's, and the room added to the account) (`limit_exceeded`, `error.limit` is `domains`). A domain the account already has is `conflict`. Where this service does not offer own domains yet the answer is `not_enabled`. Adding is limited per account per day (`rate_limited`).","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The id of the site.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainRequest"},"example":{"domain":"www.example.com"}}}},"responses":{"201":{"description":"The domain that was added.","content":{"application/json":{"schema":{"type":"object","required":["domain"],"additionalProperties":false,"properties":{"domain":{"$ref":"#/components/schemas/Domain"}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"},"501":{"$ref":"#/components/responses/Error501"},"503":{"$ref":"#/components/responses/Error503"}},"x-error-codes":["invalid_request","unauthorized","forbidden","not_found","conflict","limit_exceeded","too_large","rate_limited","unavailable","not_enabled"]},"get":{"operationId":"listDomains","tags":["sites"],"summary":"The domains of a site","description":"The domains of your own added to the site, oldest first, each with the records its owner makes. Where this service does not offer own domains yet the list is empty.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The id of the site.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The domains.","content":{"application/json":{"schema":{"type":"object","required":["domains"],"additionalProperties":false,"properties":{"domains":{"type":"array","items":{"$ref":"#/components/schemas/Domain"}}}}}}},"401":{"$ref":"#/components/responses/Error401"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}},"x-error-codes":["unauthorized","not_found","rate_limited","unavailable"]}},"/v1/sites/{id}/domains/{domainId}/check":{"post":{"operationId":"checkDomain","tags":["sites"],"summary":"Look at the DNS of a domain now","description":"Asks the DNS of the domain once and answers the domain as `GET /v1/sites/{id}/domains` shows it. Use it after the records were made or changed. When both records are right the domain is connected (`status: \"active\"`) and `certificate` says whether its certificate works yet; a connected domain whose DNS could not be asked is left as it is.\n\nA domain that is not the account's, or not on that site, is `not_found`. At most 6 looks a minute for one domain (`rate_limited`). Where this service does not offer own domains yet the answer is `not_enabled`. A look that is asked for does not change when the domain is looked at by itself.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The id of the site.","schema":{"type":"string","format":"uuid"}},{"name":"domainId","in":"path","required":true,"description":"The id of the domain.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The domain after the look.","content":{"application/json":{"schema":{"type":"object","required":["domain"],"additionalProperties":false,"properties":{"domain":{"$ref":"#/components/schemas/Domain"}}}}}},"401":{"$ref":"#/components/responses/Error401"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"501":{"$ref":"#/components/responses/Error501"},"503":{"$ref":"#/components/responses/Error503"}},"x-error-codes":["unauthorized","not_found","conflict","rate_limited","unavailable","not_enabled"]}},"/v1/sites/{id}/domains/{domainId}":{"delete":{"operationId":"removeDomain","tags":["sites"],"summary":"Remove a domain from a site","description":"A domain that is being served is taken off the serving part first and removed in the same step; when the serving part cannot be told nothing changes and the answer is `unavailable`: repeat the same call. A domain that only waits is removed at once.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The id of the site.","schema":{"type":"string","format":"uuid"}},{"name":"domainId","in":"path","required":true,"description":"The id of the domain.","schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"The domain is removed."},"401":{"$ref":"#/components/responses/Error401"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}},"x-error-codes":["unauthorized","not_found","conflict","rate_limited","unavailable"]}},"/v1/sites/{id}/releases":{"post":{"operationId":"createRelease","tags":["sites"],"summary":"Publish a new version of a site","description":"Same request and answers as `POST /v1/sites`. Files the live version already holds are reused and not listed in `uploads`. An update never takes the live version down while it is checked: if the new version is refused or held, the live one keeps serving.\n\nA site that is `quarantined` answers `forbidden`, one in review `pending_review`, a refused one `rejected`.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The id of the site.","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/Wait"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishRequest"},"example":{"title":"Quarterly report","inlineFiles":[{"path":"index.html","content":"<h1>Hello</h1>"}]}}}},"responses":{"200":{"description":"The request carried only `inlineFiles`, so it was finalized in the same call and the answer is settled. `status` is one of `live`, `pending_review`, `rejected`, `superseded`. `live`: The release is served. `pending_review`: The release is held for a person; `reasons` says why. Nothing to retry: tell the user that a person will look at it and that the decision comes by mail. If nobody has looked within 72 hours the publication is refused. An update can then be published again; a first publication leaves a `rejected` site that cannot be updated, so the files are published again as a new site and the refused site can be deleted to free its place. For an update, the version that was live keeps serving meanwhile. `rejected`: The safety checks refused the release; `reasons` says why. Do not send the same files again. `superseded`: A newer release went live first, so this one is not served.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeResult"}}}},"201":{"description":"The request listed `files`: this is the ticket. Send each file named in `uploads`, whole with `PUT` or in parts with `PATCH` (see `PUT /v1/uploads/{releaseId}/{path}`), then POST `finalizeUrl`. The upload session ends at `expiresAt` unless uploads keep arriving: it is moved to 30 minutes after every upload request that passes its checks, and it ends 24 hours after the release was created whatever arrives. Files the site already holds are not listed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishTicket"}}}},"202":{"description":"Finalized, but the answer is not settled after the wait (`wait`, default 20, at most 60 seconds). `status` is `checking`. `checking`: The checks are still running. Call `POST /v1/releases/{id}/finalize` again with the `release.id` of this answer; it is safe to repeat.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeResult"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}},"x-error-codes":["invalid_request","unauthorized","forbidden","not_found","conflict","limit_exceeded","too_large","pending_review","rejected","rate_limited","unavailable"]}},"/v1/sites/{id}/rollback":{"post":{"operationId":"rollbackSite","tags":["sites"],"summary":"Put an older version live again","description":"Needs a live site. Without a body, the newest kept version before the current one is used. A Free site keeps only its live version, so there is nothing to go back to (`conflict`). The version that was live stays kept, so going forward again is the same call with its number.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The id of the site.","schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RollbackRequest"},"example":{"version":1}}}},"responses":{"200":{"description":"The site, now at the older version.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Site"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}},"x-error-codes":["invalid_request","unauthorized","not_found","conflict","too_large","rate_limited","unavailable"]}},"/v1/sites/{id}/files":{"get":{"operationId":"listSiteFiles","tags":["sites"],"summary":"The files of the version a site serves now","description":"The release the site serves now (`release.id`, `release.number`) and the `path`, `size` and `sha256` of each of its files, sorted by path. Fetch each file with `GET /v1/sites/{id}/files/{path}` and compare what you received with the size and the hash. This is how the files of a site are taken home.\n\nIt works for a site that is not live as well, as long as it has a version that was once live (a site that was taken offline keeps its files for a while). A site that was never live has no files to give (`not_found`); a site that is switched off after a report or a check (`quarantined`) answers `forbidden`: its files are not handed out. Somebody else's site, a deleted one and an id that is not a UUID are `not_found`.\n\nCounts against the budget of uploads: 1200 requests a minute per key. The list is not counted in the byte budget of `GET /v1/sites/{id}/files/{path}`.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The id of the site.","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The version and its files.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteFiles"}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}},"x-error-codes":["unauthorized","forbidden","not_found","rate_limited","unavailable"]}},"/v1/sites/{id}/files/{path}":{"get":{"operationId":"getSiteFile","tags":["sites"],"summary":"The bytes of one file of the version a site serves now","description":"The raw bytes of the file, sent as a download (`application/octet-stream`, `Content-Disposition: attachment`, never cached), with its length in `Content-Length`. `{path}` is a path from `GET /v1/sites/{id}/files`, each segment percent-encoded on its own (`a b/c%.txt` is `a%20b/c%25.txt`); the slashes stay slashes. The same rules as for the list apply to the site.\n\n`{path}` holds slashes, which OpenAPI path parameters do not formally allow: a client generated from this document may percent-encode them as `%2F`. Build the address from the path of the list.\n\nA path that is not in the list is `not_found`; a path that cannot be a path at all (`..`, an empty segment) is `invalid_request`. The bytes are not counted as a visitor's transfer. Counts against the budget of uploads: 1200 requests a minute per key.\n\nAn account can take home at most 2 times the storage of its plan in bytes in one day (2 GB on Free; the day is a window of 24 hours that starts at 00:00 UTC). The bytes of a file are counted when it is handed out. A file that would pass the budget is refused with `rate_limited` and `Retry-After`, the seconds until the window ends; nothing is counted for a refused file, and what was counted is given back when the storage could not answer.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The id of the site.","schema":{"type":"string","format":"uuid"}},{"name":"path","in":"path","required":true,"description":"The file path from the list, segments percent-encoded, slashes between segments kept as `/` (not `%2F`).","schema":{"type":"string"}}],"responses":{"200":{"description":"The bytes of the file. A zero-byte file is an empty body.","headers":{"Content-Length":{"description":"The size of the file in bytes: the `size` of the list.","schema":{"type":"integer","minimum":0}},"Content-Disposition":{"description":"Always `attachment`.","schema":{"type":"string"}},"X-Content-Type-Options":{"description":"Always `nosniff`.","schema":{"type":"string"}},"Cache-Control":{"description":"Always `no-store`.","schema":{"type":"string"}}},"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}},"x-error-codes":["invalid_request","unauthorized","forbidden","not_found","rate_limited","unavailable"]}},"/v1/releases/{id}/finalize":{"post":{"operationId":"finalizeRelease","tags":["sites"],"summary":"Close the upload and start the checks","description":"Compares what the storage holds with the file list. Anything missing is `upload_incomplete`, naming the paths in `error.missing` (at most 100): upload those again and call this again. Then the checks run (on the Free plan before the site is served); the call waits up to `wait` seconds for them.\n\nA file that arrived in parts with all its bytes and is still being checked is not a file of the release yet: when that is the only thing missing, the answer is `upload_incomplete` with a hint to ask again in a few seconds, and nothing needs to be sent again. A file with all its bytes that could not be placed (its state says `problem: \"stuck\"`) is not being checked: the hint then says that it could not be finished, and nothing needs to be sent again either; ask the file's state in a few minutes (the service tries to finish a file again when its state is asked or a part of it is sent; this call starts no try), then call this again.\n\nSafe to repeat: a release that is no longer open answers with its stored state, the same body the first call got once there is one. The upload session ends 30 minutes after the last upload request that passed its checks, and 24 hours after the creation of the release whatever arrives; after that the answer is `forbidden` and a new release is needed.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The id of the release (`release.id` of the ticket).","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/Wait"}],"responses":{"200":{"description":"The answer is settled. `status` is one of `live`, `pending_review`, `rejected`, `superseded`. `live`: The release is served. `pending_review`: The release is held for a person; `reasons` says why. Nothing to retry: tell the user that a person will look at it and that the decision comes by mail. If nobody has looked within 72 hours the publication is refused. An update can then be published again; a first publication leaves a `rejected` site that cannot be updated, so the files are published again as a new site and the refused site can be deleted to free its place. For an update, the version that was live keeps serving meanwhile. `rejected`: The safety checks refused the release; `reasons` says why. Do not send the same files again. `superseded`: A newer release went live first, so this one is not served.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeResult"}}}},"202":{"description":"The answer is not settled yet. `status` is `checking`. `checking`: The checks are still running. Call `POST /v1/releases/{id}/finalize` again with the `release.id` of this answer; it is safe to repeat.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeResult"}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}},"x-error-codes":["invalid_request","unauthorized","forbidden","not_found","conflict","upload_incomplete","pending_review","rejected","rate_limited","unavailable"]}},"/v1/uploads/{releaseId}/{path}":{"put":{"operationId":"uploadFile","tags":["sites"],"summary":"Upload one file of an open release, whole","description":"A file may be sent whole in one request (this call) or in parts (`PATCH` of this address). A file of 16 MB or less is sent whole; a bigger one is better sent in parts of 16 MB, because a request that takes long may be ended on the way, and what a part delivered is kept while a whole file that breaks off is not.\n\nThe body is the raw bytes of the file. `{path}` is the path from the file list, each segment percent-encoded on its own (`a b/c%.txt` is `a%20b/c%25.txt`); the slashes stay slashes. The path must be exactly one of the listed paths.\n\n`{path}` holds slashes, which OpenAPI path parameters do not formally allow: a client generated from this document may percent-encode them as `%2F`. Do not build the URL from the template: use the `url` of the entry in `uploads` exactly as the ticket gives it.\n\nThe size comes from the file list: a `Content-Length` that differs, a body that is longer, or a hash that does not match is `upload_incomplete` with the path in `error.missing`. Upload the file again.\n\nEvery request that passes its checks keeps the upload session open: it ends 30 minutes after the last one, and 24 hours after the release was created whatever arrives.\n\nUploads have a budget of their own: 1200 requests a minute per key (every other call: 120); a request of any of the three methods counts as one upload.","security":[{"bearerAuth":[]}],"parameters":[{"name":"releaseId","in":"path","required":true,"description":"The id of the release (`release.id` of the ticket).","schema":{"type":"string","format":"uuid"}},{"name":"path","in":"path","required":true,"description":"The file path, segments percent-encoded, slashes between segments kept as `/` (not `%2F`).","schema":{"type":"string"}}],"requestBody":{"required":true,"description":"The bytes of the file. A zero-byte file is valid: send an empty body.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"The file is stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadResult"},"example":{"path":"index.html","size":14}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}},"x-error-codes":["invalid_request","unauthorized","forbidden","not_found","conflict","limit_exceeded","too_large","upload_incomplete","pending_review","rejected","rate_limited","unavailable"]},"get":{"operationId":"getUploadState","tags":["sites"],"summary":"Where the upload of one file stands","description":"Answers `path`, `size` (from the file list), `received` (the bytes the storage holds of the file) and `complete`. Ask it before the first part, and after ANY failure of a part (a network error, an answer that is not this service's own JSON, `conflict`, `unavailable`, `rate_limited` after its pause): continue from `received`, never from what you believe you sent. What a request that broke off delivered is kept.\n\n`complete: true`: the file is a file of the release. `received` equal to `size` with `complete: false` and no `problem`: every byte is here and the file is being checked; ask again every 2 seconds. `problem: \"mismatch\"`: the file arrived whole but with other bytes than the file list announces; it was removed, `received` is 0, and the next part starts at byte 0 (if the file on your side did not change, the connection changes bytes on the way). `problem: \"stuck\"`: every byte is here and the hash is right, but the service could not finish the file (placing it failed); stop asking every 2 seconds and send nothing again. The service tries to finish the file again when its state is asked or a part of it is sent, and not before a pause of its own after the last failed try; while it tries, the state shows every byte and no `problem`, and then says `complete: true` or `stuck` again; so ask again in a few minutes.\n\nA file the storage has nothing of is `received: 0`. The state is asked of the release that is open (`conflict` when it is not) and changes nothing, so it does not keep the upload session open. It counts as one upload in the budget of uploads.","security":[{"bearerAuth":[]}],"parameters":[{"name":"releaseId","in":"path","required":true,"description":"The id of the release (`release.id` of the ticket).","schema":{"type":"string","format":"uuid"}},{"name":"path","in":"path","required":true,"description":"The file path, segments percent-encoded, slashes between segments kept as `/` (not `%2F`).","schema":{"type":"string"}}],"responses":{"200":{"description":"Where the file stands.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadState"},"example":{"path":"video/intro.mp4","size":50331648,"received":33554432,"complete":false}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}},"x-error-codes":["invalid_request","unauthorized","forbidden","not_found","conflict","pending_review","rejected","rate_limited","unavailable"]},"patch":{"operationId":"appendUpload","tags":["sites"],"summary":"Send a part of one file","description":"The body is appended to the file at byte `offset`, and the answer says where the file stands now (`UploadState`). `offset` must be exactly `received` of the last state: anything else is `conflict` with the sentence \"This file continues at byte N.\", and the client asks for the state and sends from there. There are no part numbers, no parallel parts of one file and no call that completes a file: the part that brings the last byte completes it.\n\nA part may be of any length up to what is left of the file; 16 MB is what the clients of this service send in one request. A body longer than what is left, or a `Content-Length` that says so, is `upload_incomplete`. A request that breaks off (the connection closes, a proxy ends it) keeps the bytes that arrived: the answer, if there is one, is `upload_incomplete`, and the state says how many there are. Two requests for one file at the same moment: one wins, the other is `conflict`; so is a request while a whole `PUT` of the file runs.\n\nThe part that brings the last byte waits a short moment for the file to be checked (a file of 32 MB or more takes longer than a small one): when that is done the answer says `complete: true`; otherwise it says `received` equal to `size` with `complete: false`, and `GET` every 2 seconds tells when the file is complete. A file is a file of the release only when its SHA-256 over all its bytes equals the file list's; otherwise it is removed and the state says `problem: \"mismatch\"`. When the hash is right and the file could not be placed, the state says `problem: \"stuck\"` instead: send nothing again and ask the file's state again in a few minutes (that ask makes the service try again).\n\nThe path, the size, the checks and the session are those of `PUT`; the path is the one of the file list, each segment percent-encoded on its own.","security":[{"bearerAuth":[]}],"parameters":[{"name":"releaseId","in":"path","required":true,"description":"The id of the release (`release.id` of the ticket).","schema":{"type":"string","format":"uuid"}},{"name":"path","in":"path","required":true,"description":"The file path, segments percent-encoded, slashes between segments kept as `/` (not `%2F`).","schema":{"type":"string"}},{"name":"offset","in":"query","required":true,"description":"The byte of the file the body starts at: `received` of the last state. A whole number of bytes, from 0 to the size of the file; given once.","schema":{"type":"integer","minimum":0}}],"requestBody":{"required":true,"description":"The bytes of the part. An empty body at the end of the file is valid.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"The bytes were appended. Where the file stands now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadState"},"example":{"path":"video/intro.mp4","size":50331648,"received":50331648,"complete":true}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}},"x-error-codes":["invalid_request","unauthorized","forbidden","not_found","conflict","limit_exceeded","too_large","upload_incomplete","pending_review","rejected","rate_limited","unavailable"]}},"/v1/releases/{id}/uploads":{"get":{"operationId":"listUploads","tags":["sites"],"summary":"Where every file of a release stands","description":"The state of every file of the release in the order of its file list (`files`, each as `GET /v1/uploads/{releaseId}/{path}` answers it), the release's `status` and `expiresAt` (the end of its upload session now). One call to take an interrupted upload up again: send what is not `complete`, each file from its `received`.\n\nFor a release that is no longer `uploading` the storage is not asked and `files` is empty: `status` says what became of it. Somebody else's release is `not_found`. It is an ordinary call (not counted in the budget of uploads).","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The id of the release (`release.id` of the ticket).","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The release and where its files stand.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReleaseUploads"}}}},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}},"x-error-codes":["unauthorized","forbidden","not_found","pending_review","rejected","rate_limited","unavailable"]}},"/v1/anonymous/uploads":{"post":{"operationId":"startAnonymousUpload","tags":["anonymous"],"summary":"Start the publication of a page without an account","description":"Open to everybody, no key, no sign-in; the body is `{}` or nothing. Where this service does not offer publishing without an account the answer is `not_enabled` (\"Publishing without an account is not switched on for this service yet.\").\n\nThe answer holds an upload link, `upload.url` (`<origin>/u/<token>`). Use it as the link of an assistant: `POST <url>/publish` with `{\"files\":[{\"path\",\"size\",\"sha256\"}]}`, a `PUT` for every file the answer lists, then `POST <url>/finalize`. The link works once and runs out at `upload.expiresAt`. Both POSTs answer with `claimUrl` (the address that attaches the page to an account) and `expiresAt` (when the page is deleted if nobody claims it), except that the answer of `finalize` for a page the checks refused (`rejected`) has `expiresAt` and no `claimUrl`: such a page cannot be kept. Keep the `claimUrl`: it is shown only in those two answers.\n\nA page published this way is a Free page with less: it goes through every safety check before it is served (a check that could not run keeps it in), it is reachable only by its random link (never `public`), it has no name and no domain of its own, it is never updated (one link, one site, one release), its visitors first see a notice that it was published without an account, and it is deleted 24 hours after it was published unless it is claimed. At most 100 files, 10 MB a file and 25 MB for the page (`limit_exceeded`), and 2 GB of downloads in all, after which the page is switched off. An account gives more room.\n\nOne client network may start 3 pages a day, and the service as a whole a number of its own: past either the answer is `rate_limited` with `Retry-After`. `unavailable` while the storage is nearly full or too many such pages are alive: try again later.","security":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnonymousUploadRequest"},"example":{}}}},"responses":{"201":{"description":"The upload link of the page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnonymousUploadStarted"},"example":{"upload":{"url":"https://example.test/u/EXAMPLE-LINK","expiresAt":"2030-01-01T00:30:00.000Z"}}}}},"400":{"$ref":"#/components/responses/Error400"},"403":{"$ref":"#/components/responses/Error403"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"},"501":{"$ref":"#/components/responses/Error501"},"503":{"$ref":"#/components/responses/Error503"}},"x-error-codes":["invalid_request","forbidden","too_large","rate_limited","unavailable","not_enabled"]}},"/v1/sites/claim":{"post":{"operationId":"claimSite","tags":["sites"],"summary":"Add a page that was published without an account to the account","description":"`token` is the last part of the `claimUrl` that publishing without an account answered (`<origin>/claim/<token>`). The page becomes a site of the account, under the plan's own limits: a new site would meet the number of sites, the room in storage and the publications of a day, and an account that has no room gets that limit's own `limit_exceeded` and the page stays as it was. It is no longer deleted after 24 hours, its visitors no longer see the notice, and the badge follows the plan.\n\nA token that names no page that can be claimed (it never existed, it was used already, the page was deleted, the page was refused by the safety checks) is `not_found`, always with the same sentence. A page that is switched off, waits for a person or has a report that is not decided yet is `forbidden`: it is kept until that is settled, and the same link works afterwards if the page is still there.\n\n`unavailable` means the storage behind the service could not take the change: nothing changed, try again.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimRequest"},"example":{"token":"EXAMPLE-CLAIM-TOKEN"}}}},"responses":{"200":{"description":"The page is now a site of the account.","content":{"application/json":{"schema":{"type":"object","required":["site"],"additionalProperties":false,"properties":{"site":{"$ref":"#/components/schemas/Site"}}}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/Error409"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}},"x-error-codes":["invalid_request","unauthorized","forbidden","not_found","conflict","limit_exceeded","too_large","rate_limited","unavailable"]}},"/v1/reports":{"post":{"operationId":"fileReport","tags":["reports"],"summary":"Report a published address","description":"Open to everybody, no key: 10 reports an hour per client network. The answer is 201 and the same for every well-formed address under the content domain (`putlive.page`), whether or not a site is there. An address on another domain is accepted only when a domain that is connected to a site has it, and is refused otherwise. `quarantined` is always false: the reporter must confirm the receipt that is mailed to them (`POST /v1/reports/confirm`) before anything is decided.\n\n`category` is one of `phishing`, `malware`, `illegal_content`, `copyright`, `adult`, `spam_redirect`, `terms`, `legal_order`. The explanation has 10 to 4000 characters, and `goodFaith` must be true.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportRequest"},"example":{"url":"https://example-report.putlive.page/","category":"phishing","explanation":"The page imitates a bank sign-in form.","reporterEmail":"person@example.com","goodFaith":true}}}},"responses":{"201":{"description":"The report is stored; a receipt is mailed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportReceipt"}}}},"400":{"$ref":"#/components/responses/Error400"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}},"x-error-codes":["invalid_request","too_large","rate_limited","unavailable"]}},"/v1/reports/confirm":{"post":{"operationId":"confirmReport","tags":["reports"],"summary":"Confirm a report with the token of the receipt","description":"The button of the page the receipt's link opens. A link opened by a mail scanner confirms nothing: this request is needed. The token works once, within 24 hours; an unknown, used or expired token is `not_found`. Open to everybody, no key: 60 attempts an hour per client network.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportConfirmRequest"},"example":{"token":"EXAMPLE-TOKEN"}}}},"responses":{"200":{"description":"The report is confirmed.","content":{"application/json":{"schema":{"type":"object","required":["confirmed"],"additionalProperties":false,"properties":{"confirmed":{"const":true}}}}}},"400":{"$ref":"#/components/responses/Error400"},"404":{"$ref":"#/components/responses/Error404"},"413":{"$ref":"#/components/responses/Error413"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}},"x-error-codes":["invalid_request","not_found","too_large","rate_limited","unavailable"]}},"/v1/log":{"get":{"operationId":"getLog","tags":["account"],"summary":"The log of the account's actions","description":"What the people of the account did for it (published, deleted, changed access, made or ended a key or a connection, joined or left the team, and the like), newest first, as JSON or as a CSV file. Only the OWNER of an account whose plan includes the log may ask: a member's key is `forbidden` (and the refusal is itself written to the log), and so is an account whose plan has no log. Entries are kept for 365 days.\n\nAn entry names the person (`actor.id` stays when the person's own account was erased; `actor.email` is then `null`), the way they came in (`via`: `key`, `session`, `connector`, `link` or `system`, and `viaLabel`, the key's or the app's name), the action, what it was done to, whether it was `done` or `refused`, and the NETWORK the request came from (`203.0.113.0/24`, or the first 48 bits of an IPv6 address): the whole address of a request is never given.\n\nA page holds 50 entries unless `limit` says another number, at most 10000; a larger `limit` is cut to that, not refused. When more entries are left, `next` of the JSON (or the header `X-Log-Next` of the CSV) is a place to go on from: send it back as `before`, with the same other parameters. It is only a position in THIS account's log. A complete answer has `next` null (no `X-Log-Next` header).\n\n`from` is included and `to` is not; a date alone (`2030-01-31`) as `to` means that whole day. A parameter that is not listed, or that is given twice, is `invalid_request`.\n\n`format=csv` answers `text/csv; charset=utf-8` as a file (`Content-Disposition: attachment; filename=\"log.csv\"`): a header row of the field names, `actorKind`, `actorId`, `actorEmail`, `targetKind` and so on, and one row for each entry. A text that a spreadsheet would run as a formula (it starts with `=`, `+`, `-`, `@`, a tab or a carriage return) has an apostrophe put in front of it. Counts against the per-key request budget like every other call.","security":[{"bearerAuth":[]}],"parameters":[{"name":"from","in":"query","required":false,"description":"The first moment shown: a date (`2030-01-31`) or a date and time with a zone (`2030-01-31T09:30:00Z`).","schema":{"type":"string"}},{"name":"to","in":"query","required":false,"description":"The first moment NOT shown, in the same forms; a date alone means the end of that day.","schema":{"type":"string"}},{"name":"actor","in":"query","required":false,"description":"Only the entries of one person: the `actor.id` an entry gives.","schema":{"type":"string"}},{"name":"action","in":"query","required":false,"description":"Only one action.","schema":{"type":"string","enum":["site.published","site.rolled_back","site.deleted","site.access_changed","site.name_changed","site.claimed","domain.added","domain.removed","key.created","key.revoked","connection.authorized","connection.ended","upload_link.created","person.signed_in","plan.checkout_started","plan.portal_opened","plan.refund_requested","plan.changed","team.invited","team.invitation_cancelled","team.member_joined","team.member_removed","team.member_left","moderation.action","log.read","plan.line_bought","plan.line_lowered","plan.switch_asked","plan.auto_buy_set"]}},{"name":"limit","in":"query","required":false,"description":"How many entries at most: 50 when left out, 10000 at most (more is cut to that).","schema":{"type":"integer","minimum":1,"maximum":10000,"default":50}},{"name":"before","in":"query","required":false,"description":"Where to go on from: the `next` of the answer before. Send it back unchanged.","schema":{"type":"string"}},{"name":"format","in":"query","required":false,"description":"The shape of the answer.","schema":{"type":"string","enum":["json","csv"],"default":"json"}}],"responses":{"200":{"description":"A page of the log.","headers":{"X-Log-Next":{"description":"Only on a CSV that was cut at its limit: the place to go on from (send it as `before`). A complete CSV has no such header.","schema":{"type":"string"}},"Content-Disposition":{"description":"Only on a CSV: `attachment; filename=\"log.csv\"`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LogPage"}},"text/csv":{"schema":{"type":"string","description":"A header row and one row for each entry; every row ends with CRLF."}}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"429":{"$ref":"#/components/responses/Error429"},"501":{"$ref":"#/components/responses/Error501"},"503":{"$ref":"#/components/responses/Error503"}},"x-error-codes":["invalid_request","unauthorized","forbidden","rate_limited","unavailable","not_enabled"]}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"An API key (`ah_` and 40 letters and digits), from `POST /v1/auth/token`. Exactly `Authorization: Bearer <key>`; no other header, no query parameter, no cookie."}},"parameters":{"Wait":{"name":"wait","in":"query","required":false,"description":"Seconds the call may wait for the checks (0 to 60, more is cut to 60).","schema":{"type":"number","minimum":0,"maximum":60,"default":20}}},"schemas":{"ErrorCode":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","conflict","limit_exceeded","too_large","upload_incomplete","pending_review","rejected","rate_limited","unavailable","not_enabled"],"description":"Every code the API answers with. Each has one HTTP status; the guide at /llms.txt says what to do for each."},"ApiErrorBody":{"type":"object","required":["error"],"additionalProperties":false,"properties":{"error":{"type":"object","required":["code","message"],"additionalProperties":false,"properties":{"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"type":"string","description":"A sentence for a person or an agent. Do not match on its wording: match on `code`."},"hint":{"type":"string","description":"What to do next, when there is something specific."},"limit":{"type":"string","description":"`limit_exceeded`: which limit (`disk`, `file_size`, `files`, `sites`, `storage`, `publishes_per_day`, `email_list`, `api_keys`, `domains`). `too_large`: the size limit of the body."},"missing":{"type":"array","maxItems":100,"items":{"type":"string"},"description":"`upload_incomplete` only: the paths that are missing or arrived with another size or hash."}}}},"example":{"error":{"code":"limit_exceeded","message":"The free plan allows 5 sites and you have 5.","limit":"sites","hint":"Delete a site you no longer need (DELETE /v1/sites/<id>), or update one of the existing sites."}}},"PlanId":{"type":"string","enum":["free","domain","plus","pro"]},"SignInCodeRequest":{"type":"object","required":["email","request_id"],"additionalProperties":false,"properties":{"email":{"type":"string","maxLength":320},"request_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{22}$","description":"A value you make for this request for a code: 22 characters of A-Z, a-z, 0-9, - and _. Send the same value when you trade the code for a key."},"invite":{"type":"string","maxLength":128,"description":"The invitation code. Needed by an address that has no account yet where sign-up is by invitation; ignored where it is open."}}},"TokenRequest":{"type":"object","required":["email","code","request_id","key_name"],"additionalProperties":false,"properties":{"email":{"type":"string","maxLength":320},"code":{"type":"string","maxLength":64,"description":"The 8 digits from the mail; spaces and hyphens are ignored."},"request_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{22}$","description":"The value you sent when you asked for the code."},"key_name":{"type":"string","minLength":1,"maxLength":64,"description":"A name for the key so its owner can tell their keys apart. Plain text."}}},"Account":{"type":"object","required":["id","email","plan"],"additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"plan":{"$ref":"#/components/schemas/PlanId"}}},"TokenResponse":{"type":"object","required":["api_key","account"],"additionalProperties":false,"properties":{"api_key":{"type":"string","pattern":"^ah_[0-9A-Za-z]{40}$","description":"Send it as `Authorization: Bearer <key>`. Shown once."},"account":{"$ref":"#/components/schemas/Account"}}},"PlanLimits":{"type":"object","description":"The limits of a plan. The Free plan: 5 sites, 1 GB of storage, 10 GB of transfer a month, 100 MB a file, 1 kept version, 5 e-mail list entries, no `public` mode, a badge on the pages. In the answer of `GET /v1/me` the numbers of storage, transfer and own domains (`storageBytes`, `transferBytesPerMonth`, `customDomains`) are the account's own: the plan's and the room added to the account.","required":["sites","publishesPerDay","storageBytes","transferBytesPerMonth","maxFileBytes","customDomains","versionsKept","emailAllowlistMax","customSlug","publicMode","badge","importByLink","openStats","videoPages"],"additionalProperties":false,"properties":{"sites":{"type":"integer"},"publishesPerDay":{"type":"integer","description":"Publications the account may start in a rolling 24 hours: four for each site the plan allows."},"storageBytes":{"type":"integer"},"transferBytesPerMonth":{"type":"integer"},"maxFileBytes":{"type":"integer"},"customDomains":{"type":"integer"},"versionsKept":{"type":"integer"},"emailAllowlistMax":{"type":["integer","null"],"description":"`null` is unlimited."},"customSlug":{"type":"boolean"},"publicMode":{"type":"boolean"},"badge":{"type":"boolean"},"importByLink":{"type":"boolean","description":"Whether the plan includes publishing a public file by its address (`POST /v1/sites/import`). The call is also subject to the instance having it switched on, which is asked first: where it is not, the answer is `not_enabled` whatever this says; where it is, an account whose plan has none is `forbidden`."},"openStats":{"type":"boolean","description":"Whether the plan includes the count of how often a site is opened (`GET /v1/sites/{id}/opens`, and `opens` in the answer for a site) and the mail at the next opening (`notifyNextOpen` of `PATCH /v1/sites/{id}`). Where it is false those are absent or refused with `forbidden`, and nothing is counted for the account's sites."},"videoPages":{"type":"boolean","description":"Whether a video that is published alone gets a player page, and a video among pictures a playable clip with a poster. Where it is false a video published alone is the file itself and a video among pictures is a link to it. Pages for audio, pictures and documents are in every plan."}}},"Me":{"type":"object","required":["account","limits","usage","actor"],"additionalProperties":false,"properties":{"account":{"$ref":"#/components/schemas/Account"},"actor":{"type":"object","description":"Who is asking. `account` is the account the key acts for; for a member of a team that is the owner's account, and `actor` is the member.","required":["email","role"],"additionalProperties":false,"properties":{"email":{"type":"string","description":"The address of the person the key belongs to."},"role":{"type":"string","enum":["owner","member"]}}},"limits":{"$ref":"#/components/schemas/PlanLimits"},"usage":{"type":"object","required":["sites","storageBytes","transferBytesThisMonth"],"additionalProperties":false,"properties":{"sites":{"type":"integer"},"storageBytes":{"type":"integer"},"transferBytesThisMonth":{"type":"integer"}}}}},"Usage":{"type":"object","required":["plan","sites","storage","transfer"],"additionalProperties":false,"properties":{"plan":{"$ref":"#/components/schemas/PlanId"},"sites":{"type":"object","required":["used","limit"],"additionalProperties":false,"properties":{"used":{"type":"integer"},"limit":{"type":"integer"}}},"storage":{"type":"object","required":["usedBytes","limitBytes"],"additionalProperties":false,"properties":{"usedBytes":{"type":"integer"},"limitBytes":{"type":"integer"}}},"transfer":{"type":"object","required":["usedBytes","limitBytes","resetsAt"],"additionalProperties":false,"properties":{"usedBytes":{"type":"integer"},"limitBytes":{"type":"integer"},"resetsAt":{"type":"string","format":"date-time"}}}}},"AccessMode":{"type":"string","enum":["link","password","email","public"]},"SiteNameRequest":{"type":"object","additionalProperties":false,"description":"At least one of the two keys. An unknown key is refused, never dropped.","properties":{"name":{"type":["string","null"],"maxLength":200,"description":"The name for the address (trimmed and lower-cased), or null to give it up."},"notifyNextOpen":{"type":"boolean","enum":[true],"description":"True: mail the owner the next time the site is opened. Only on a plan that includes opens."}}},"SiteOpensSummary":{"type":"object","required":["total","last30Days","firstAt","lastAt","notice"],"additionalProperties":false,"description":"How often the site was opened, as far as the request can tell (see `GET /v1/sites/{id}/opens`). Present only for an account whose plan includes opens: absent, not zero, otherwise.","properties":{"total":{"type":"integer","description":"In all, since the site was first counted (0 or more)."},"last30Days":{"type":"integer","description":"In the last 30 days, today included (0 or more)."},"firstAt":{"type":["string","null"],"format":"date-time","description":"The start of the 10 minutes in which it was first opened."},"lastAt":{"type":["string","null"],"format":"date-time","description":"The start of the 10 minutes in which it was last opened."},"notice":{"type":"string","enum":["armed","off"],"description":"`armed`: the owner is mailed for the first step of 10 minutes that begins after the request and brings an opening."}}},"SiteOpens":{"type":"object","required":["days"],"additionalProperties":false,"properties":{"days":{"type":"array","description":"The days of the last 90 on which the site was opened, newest first.","items":{"type":"object","required":["day","count"],"additionalProperties":false,"properties":{"day":{"type":"string","description":"`YYYY-MM-DD`, UTC."},"count":{"type":"integer","description":"How many openings that day (1 or more)."}}}},"recipients":{"type":"array","description":"Only for a site in the mode `email`: the addresses of the list (or of a listed domain) that signed in with a code.","items":{"type":"object","required":["email","count","firstAt","lastAt"],"additionalProperties":false,"properties":{"email":{"type":"string"},"count":{"type":"integer","description":"How many times this address signed in (1 or more)."},"firstAt":{"type":"string","format":"date-time"},"lastAt":{"type":"string","format":"date-time"}}}}},"example":{"days":[{"day":"2030-01-02","count":3},{"day":"2030-01-01","count":1}],"recipients":[{"email":"person@example.com","count":2,"firstAt":"2030-01-01T09:00:00.000Z","lastAt":"2030-01-02T10:00:00.000Z"}]}},"DomainRequest":{"type":"object","required":["domain"],"additionalProperties":false,"description":"An unknown key is refused, never dropped.","properties":{"domain":{"type":"string","description":"The domain name, for example `example.com` or `www.example.com`. A whole address is accepted and its host is taken."}}},"DnsRecord":{"type":"object","required":["purpose","type","name","value"],"additionalProperties":false,"properties":{"purpose":{"type":"string","enum":["ownership","pointing"],"description":"`ownership`: shows that the name is the account's. `pointing`: sends the name here."},"type":{"type":"string","enum":["TXT","CNAME","A"]},"name":{"type":"string","description":"The name of the record, as a full domain name."},"value":{"type":"string","description":"What the record says. The value of the `ownership` record is a secret of the account: show it to the account's owner only."}}},"DomainProblem":{"type":"object","required":["code","message","fix"],"additionalProperties":false,"properties":{"code":{"type":"string"},"message":{"type":"string","description":"What was found, in words."},"fix":{"type":"string","description":"What to change."}}},"Domain":{"type":"object","required":["id","domain","status","records","problems","checkedAt","certificate"],"additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"domain":{"type":"string","description":"The name as a lower-case ASCII name, with no trailing dot."},"status":{"type":"string","enum":["pending","active","stopped"],"description":"`pending`: added, not connected yet, or no longer connected because its DNS stopped pointing here. `active`: connected and served. `stopped`: not served any more, because the account's plan has no room for it."},"records":{"type":"array","items":{"$ref":"#/components/schemas/DnsRecord"},"description":"The DNS records to make."},"problems":{"type":"array","items":{"$ref":"#/components/schemas/DomainProblem"},"description":"What the last look at the name's DNS found, each with the record to create, change or remove; empty when nothing is wrong or nothing has been looked at."},"checkedAt":{"type":["string","null"],"format":"date-time","description":"When its DNS was last looked at, or null."},"certificate":{"type":"string","enum":["none","pending","ready"],"description":"`none`: not connected. `pending`: connected, the certificate is not working yet. `ready`: the certificate works."}},"example":{"id":"00000000-0000-4000-8000-000000000000","domain":"www.example.com","status":"pending","records":[{"purpose":"ownership","type":"TXT","name":"_site-challenge.example.com","value":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},{"purpose":"pointing","type":"CNAME","name":"www.example.com","value":"sites.example.net"}],"problems":[],"checkedAt":null,"certificate":"none"}},"SiteDomain":{"type":"object","required":["id","domain","status"],"additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"domain":{"type":"string"},"status":{"type":"string","enum":["pending","active","stopped"]}}},"AccessRequest":{"type":"object","required":["mode"],"additionalProperties":false,"description":"A setting the mode does not use is refused, not ignored: a `password` sent with `link` is `invalid_request`.","properties":{"mode":{"$ref":"#/components/schemas/AccessMode"},"password":{"type":"string","description":"Only with `password`; 8 to 256 characters. Never stored in plain text."},"emails":{"type":"array","items":{"type":"string"},"description":"Only with `email`. Replaces the list."},"emailDomains":{"type":"array","items":{"type":"string"},"description":"Only with `email`. A lower-case domain with a dot; public and disposable mail domains are refused."},"expiresAt":{"type":["string","null"],"format":"date-time","description":"A date and time WITH a time zone, in the future. `null` removes the expiry."},"revoke":{"type":"boolean","description":"`true` switches access off for everybody; `false` brings it back."}}},"Access":{"type":"object","required":["mode"],"additionalProperties":false,"description":"Who may open the site. The owner sees the lists they set; the password is never returned.","properties":{"mode":{"$ref":"#/components/schemas/AccessMode"},"expiresAt":{"type":"string","format":"date-time"},"revoked":{"const":true},"emails":{"type":"array","items":{"type":"string"}},"emailDomains":{"type":"array","items":{"type":"string"}}}},"SiteStatus":{"type":"string","enum":["pending_upload","checking","live","pending_review","rejected","quarantined","unpublished","deleted"],"description":"`pending_upload`: created, files not closed yet. `checking`: the first release is being checked. `live`: served. `pending_review`: held for a person. `rejected`: refused by the checks. `quarantined`: switched off by a person or a rule, files kept. `unpublished`: taken offline (an idle account), publish again to bring it back. `deleted`."},"ResultStatus":{"type":"string","enum":["live","checking","pending_review","rejected","superseded"],"description":"What the publication answers, one status for the caller to act on. `live`: The release is served. `checking`: The checks are still running. Call `POST /v1/releases/{id}/finalize` again with the `release.id` of this answer; it is safe to repeat. `pending_review`: The release is held for a person; `reasons` says why. Nothing to retry: tell the user that a person will look at it and that the decision comes by mail. If nobody has looked within 72 hours the publication is refused. An update can then be published again; a first publication leaves a `rejected` site that cannot be updated, so the files are published again as a new site and the refused site can be deleted to free its place. For an update, the version that was live keeps serving meanwhile. `rejected`: The safety checks refused the release; `reasons` says why. Do not send the same files again. `superseded`: A newer release went live first, so this one is not served. `pending_review` is the answer, not a status of a release: the site's own status (`site.status`) says whether something is live meanwhile."},"Site":{"type":"object","required":["id","url","slug","name","addresses","title","status","access","domains","version","storageBytes","updatedAt"],"additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri","description":"The address to give people: `addresses[0]`, which is `<name>.putlive.page` for a site that has a name and `<slug>.putlive.page` otherwise."},"slug":{"type":"string","description":"The first label of the generated address. It never changes."},"name":{"type":["string","null"],"description":"The name the account chose for the address, or null. The generated address keeps working beside it."},"addresses":{"type":"array","minItems":1,"items":{"type":"string","format":"uri"},"description":"Every address of the site for people, best first: the name's address, then the generated one."},"title":{"type":["string","null"],"maxLength":200,"description":"The title given when the site was published, or null."},"status":{"$ref":"#/components/schemas/SiteStatus"},"access":{"$ref":"#/components/schemas/Access"},"domains":{"type":"array","items":{"$ref":"#/components/schemas/SiteDomain"},"description":"The domains of your own added to the site, oldest first (`GET /v1/sites/{id}/domains` has the records of each)."},"version":{"type":"integer","minimum":0,"description":"The number of the live release; 0 while nothing is live."},"storageBytes":{"type":"integer"},"opens":{"$ref":"#/components/schemas/SiteOpensSummary"},"page":{"type":"string","enum":["site","markdown","file","player","gallery","document","download"],"description":"What the address of the live version opens, as the service said it built it at the last activation: `site` (your files, with `index.html` as the front page), `markdown` (a Markdown file shown as a page), `file` (the single file itself), `player` (a page with a player for a video or a sound), `gallery` (a page of tiles for pictures, clips and sounds), `document` (the PDF made from a presentation, text document or workbook), `download` (a page with a link to download the file). Absent while a version has not been put live since the service began to say it."},"updatedAt":{"type":"string","format":"date-time"}},"example":{"id":"00000000-0000-4000-8000-000000000000","url":"https://calm-river-0000000000.putlive.page/","slug":"calm-river-0000000000","name":null,"addresses":["https://calm-river-0000000000.putlive.page/"],"title":"Launch page","status":"live","access":{"mode":"link"},"domains":[],"version":1,"storageBytes":14,"updatedAt":"2030-01-01T00:00:00.000Z"}},"FileEntry":{"type":"object","required":["path","size","sha256"],"description":"An unknown key is dropped (`contentType` included: the server decides what a file is from its name). A missing or mistyped `path`, `size` or `sha256` refuses the whole request.","properties":{"path":{"type":"string","description":"A relative path with \"/\" separators: no \"..\", \".\", empty segments, backslashes or control characters; at most 1024 bytes (255 per segment); not `__gate` or anything under `__gate/`. Two paths that differ only by letter case are refused."},"size":{"type":"integer","minimum":0,"description":"Bytes. A zero-byte file is valid, but the files together may not weigh zero."},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"Lower-case hexadecimal."},"contentType":{"type":"string","maxLength":255,"description":"Accepted and ignored."}}},"InlineFile":{"type":"object","required":["path","content"],"description":"An unknown key is dropped. A missing `path` or `content`, or a `content` that is not text, refuses the whole request. The content is text (UTF-8).","properties":{"path":{"type":"string","description":"The same rules as `FileEntry.path`."},"content":{"type":"string"}}},"PublishRequest":{"type":"object","additionalProperties":false,"description":"An unknown key at this level is refused, never dropped. At least one file is needed, and at most 2500 (`files` and `inlineFiles` together). A path may not be in both lists.","properties":{"title":{"type":"string","maxLength":200},"name":{"type":"string","maxLength":200,"description":"A name of the account's own for the address, a second address beside the generated one (see `PATCH /v1/sites/{id}` for the rules). Only when a site is created, and only for an account whose plan includes it; a new version of a site that exists refuses it."},"spa":{"type":"boolean","description":"Serve `index.html` for paths that match no file (a single-page app)."},"access":{"$ref":"#/components/schemas/AccessRequest","description":"The access the site starts with. Default: `link`. On an update the access is changed after everything else has worked."},"files":{"type":"array","items":{"$ref":"#/components/schemas/FileEntry"},"description":"Files to upload afterwards with PUT."},"inlineFiles":{"type":"array","items":{"$ref":"#/components/schemas/InlineFile"},"description":"Small text files sent in the request, 256 KB together. With only these the call is finalized for you."}}},"PublishTicket":{"type":"object","required":["site","release","uploads","finalizeUrl","expiresAt"],"additionalProperties":false,"properties":{"site":{"$ref":"#/components/schemas/Site"},"release":{"type":"object","required":["id","number"],"additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"number":{"type":"integer","minimum":1}}},"uploads":{"type":"array","description":"Only the files the storage does not hold yet.","items":{"type":"object","required":["path","method","url"],"additionalProperties":false,"properties":{"path":{"type":"string"},"method":{"const":"PUT"},"url":{"type":"string","format":"uri"}}}},"finalizeUrl":{"type":"string","format":"uri"},"expiresAt":{"type":"string","format":"date-time","description":"The upload session ends at this moment unless uploads keep arriving: every upload request that passes its checks moves it to 30 minutes after that request, and it ends 24 hours after the release was created whatever arrives. `GET /v1/releases/{id}/uploads` tells where it stands."}}},"CheckSummary":{"type":"object","required":["name","status"],"additionalProperties":false,"properties":{"name":{"type":"string","description":"`malware`, `links`, `impersonation`, `credential_forms` or `coverage`."},"status":{"type":"string","enum":["passed","failed","skipped","pending"],"description":"`pending`: the check could not run yet, waits for a person, or is still to follow a release that is already served. It is never read as passed."},"detail":{"type":"string"}}},"FinalizeResult":{"type":"object","required":["status","release","site","checks"],"additionalProperties":false,"properties":{"status":{"$ref":"#/components/schemas/ResultStatus"},"release":{"type":"object","required":["id","number"],"additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"number":{"type":"integer","minimum":1}}},"site":{"$ref":"#/components/schemas/Site"},"checks":{"type":"array","items":{"$ref":"#/components/schemas/CheckSummary"}},"reasons":{"type":"array","items":{"type":"string"},"description":"In plain sentences, why a release was refused or held. Show them to the user."}}},"UploadResult":{"type":"object","required":["path","size"],"additionalProperties":false,"properties":{"path":{"type":"string"},"size":{"type":"integer","minimum":0}}},"UploadState":{"type":"object","required":["path","size","received","complete"],"additionalProperties":false,"properties":{"path":{"type":"string"},"size":{"type":"integer","minimum":0,"description":"The size the file list announces."},"received":{"type":"integer","minimum":0,"description":"The bytes the storage holds of the file, from byte 0 on without a gap. The next part starts here."},"complete":{"type":"boolean","description":"True when the file is a file of the release. `received` equal to `size` with `complete: false` and no `problem`: every byte is here and the file is being checked; ask again in 2 seconds."},"problem":{"type":"string","enum":["mismatch","stuck"],"description":"`mismatch`: the file arrived whole with other bytes than the file list announces: it was removed, `received` is 0, and the next part starts at byte 0. `stuck`: every byte is here and the hash is right, but the service could not finish the file; send nothing again and ask the state again in a few minutes (the service tries again when the file's state is asked or a part of it is sent)."}}},"ReleaseUploads":{"type":"object","required":["status","expiresAt","files"],"additionalProperties":false,"properties":{"status":{"type":"string","enum":["uploading","checking","live","superseded","rejected"],"description":"What became of the release. `uploading` is the only status with files to look at."},"expiresAt":{"type":"string","format":"date-time","description":"The end of the upload session now."},"files":{"type":"array","items":{"$ref":"#/components/schemas/UploadState"},"description":"Every file of the release in the order of its file list; empty unless `status` is `uploading`."}}},"SiteFiles":{"type":"object","required":["release","files"],"additionalProperties":false,"properties":{"release":{"type":"object","required":["id","number"],"additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"number":{"type":"integer","minimum":1}}},"files":{"type":"array","items":{"type":"object","required":["path","size","sha256"],"additionalProperties":false,"properties":{"path":{"type":"string"},"size":{"type":"integer","minimum":0},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"}}}}}},"RollbackRequest":{"type":"object","additionalProperties":false,"properties":{"version":{"type":"integer","minimum":1,"description":"A release number (`Site.version` of an older state). Without it: the previous version."}}},"ReportRequest":{"type":"object","required":["url","category","explanation","reporterEmail","goodFaith"],"additionalProperties":false,"properties":{"url":{"type":"string","maxLength":2000,"description":"The address of a site published here: one label under `putlive.page`, or an address on a domain that is connected to a site."},"category":{"type":"string","enum":["phishing","malware","illegal_content","copyright","adult","spam_redirect","terms","legal_order"]},"explanation":{"type":"string","minLength":10,"maxLength":4000},"reporterName":{"type":"string","maxLength":200},"reporterEmail":{"type":"string","description":"An address that can receive the receipt; it must be confirmed."},"goodFaith":{"const":true,"description":"The reporter states that the information is accurate and complete to the best of their knowledge."}}},"ReportReceipt":{"type":"object","required":["id","quarantined","message"],"additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"quarantined":{"const":false},"message":{"type":"string"}}},"ReportConfirmRequest":{"type":"object","required":["token"],"additionalProperties":false,"properties":{"token":{"type":"string","maxLength":200}}},"AnonymousUploadRequest":{"type":"object","additionalProperties":false,"description":"Nothing is sent: an empty object, or no body at all. A key of any name is refused."},"AnonymousUploadStarted":{"type":"object","required":["upload"],"additionalProperties":false,"properties":{"upload":{"type":"object","required":["url","expiresAt"],"additionalProperties":false,"properties":{"url":{"type":"string","format":"uri","description":"The upload link. Its token is the credential: do not share or log it."},"expiresAt":{"type":"string","format":"date-time","description":"When the link runs out if nobody has sent the list of files."}}}}},"ImportRequest":{"type":"object","required":["url"],"additionalProperties":false,"properties":{"url":{"type":"string","maxLength":2048,"description":"The web address (`http` or `https`) of ONE public file that opens for anybody with no sign-in. Not a page inside an assistant's own viewer, not an archive."},"title":{"type":"string","maxLength":200,"description":"A short name for the site."},"siteId":{"type":"string","format":"uuid","description":"A site of the account to publish a new version of. Left out, a new site is made."}}},"ImportResult":{"type":"object","required":["status","release","site","checks","file","warnings"],"additionalProperties":false,"properties":{"status":{"$ref":"#/components/schemas/ResultStatus"},"release":{"type":"object","required":["id","number"],"additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"number":{"type":"integer","minimum":1}}},"site":{"$ref":"#/components/schemas/Site"},"checks":{"type":"array","items":{"$ref":"#/components/schemas/CheckSummary"}},"reasons":{"type":"array","items":{"type":"string"},"description":"In plain sentences, why a release was refused or held. Show them to the user."},"file":{"type":"object","required":["name","size","contentType"],"additionalProperties":false,"description":"What was imported, as the service read the file. Look at it before you tell the user it is done: a link that needs a sign-in hands out the sign-in page, an HTML page, which is not what the user expected.","properties":{"name":{"type":"string","description":"The name the file has on the site. An HTML page is `index.html`."},"size":{"type":"integer","minimum":1,"description":"The size of the file in bytes."},"contentType":{"type":"string","description":"The media type of the file, such as `text/html` or `application/pdf`."}}},"warnings":{"type":"array","items":{"type":"string","enum":["relative_files"]},"description":"`relative_files`: the page refers to other files by a relative address; those files were not imported, so it may look incomplete. Tell the user. Empty when there is nothing to say."}}},"ClaimRequest":{"type":"object","required":["token"],"additionalProperties":false,"properties":{"token":{"type":"string","maxLength":256,"description":"The claim token: the last part of the `claimUrl` (43 characters of A-Z, a-z, 0-9, - and _). A secret: do not share or log it."}}},"LogEntry":{"type":"object","required":["id","at","actor","via","viaLabel","action","target","result","detail","network","userAgent"],"additionalProperties":false,"properties":{"id":{"type":"string","format":"uuid"},"at":{"type":"string","format":"date-time","description":"When it happened, in UTC, with milliseconds."},"actor":{"type":"object","required":["kind","id","email"],"additionalProperties":false,"properties":{"kind":{"type":"string","enum":["owner","member","operator","system","unknown"],"description":"`owner` or `member`: a person of the account. `operator`: somebody who works for the service. `system`: a job or a step of the service itself. `unknown`: the service could not tell."},"id":{"type":["string","null"],"description":"The id of the person; it stays when their account was erased. `null` for the system."},"email":{"type":["string","null"],"description":"The address the person had then; `null` for the system, for an operator, and for a person whose account was erased."}}},"via":{"type":"string","enum":["key","session","connector","link","system"]},"viaLabel":{"type":["string","null"],"description":"The name of the key or of the connected app."},"action":{"type":"string","enum":["site.published","site.rolled_back","site.deleted","site.access_changed","site.name_changed","site.claimed","domain.added","domain.removed","key.created","key.revoked","connection.authorized","connection.ended","upload_link.created","person.signed_in","plan.checkout_started","plan.portal_opened","plan.refund_requested","plan.changed","team.invited","team.invitation_cancelled","team.member_joined","team.member_removed","team.member_left","moderation.action","log.read","plan.line_bought","plan.line_lowered","plan.switch_asked","plan.auto_buy_set"]},"target":{"type":"object","required":["kind","id","label"],"additionalProperties":false,"properties":{"kind":{"type":["string","null"]},"id":{"type":["string","null"]},"label":{"type":["string","null"]}}},"result":{"type":"string","enum":["done","refused"]},"detail":{"type":["string","null"]},"network":{"type":["string","null"],"description":"The network the request came from: an IPv4 /24 or an IPv6 /48. Never the whole address."},"userAgent":{"type":["string","null"],"description":"The browser or client as it called itself, cleaned of control characters and cut to 200 characters."}}},"LogPage":{"type":"object","required":["entries","next"],"additionalProperties":false,"properties":{"entries":{"type":"array","items":{"$ref":"#/components/schemas/LogEntry"},"description":"Newest first."},"next":{"type":["string","null"],"description":"Where to go on from (send it as `before`), or `null` when nothing is left."}}}},"responses":{"Error400":{"description":"An error. The `error.code` is one of: `invalid_request` (The request is malformed or breaks a rule of the API. Fix it and send it again.)","headers":{"Cache-Control":{"description":"Always `no-store`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"Error401":{"description":"An error. The `error.code` is one of: `unauthorized` (No valid API key, or a wrong or expired sign-in code.)","headers":{"Cache-Control":{"description":"Always `no-store`.","schema":{"type":"string"}},"WWW-Authenticate":{"description":"Always `Bearer`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"Error403":{"description":"An error. The `error.code` is one of: `forbidden` (The request is understood and refused: country, invitation, plan, a switched-off site, an expired upload session.) `limit_exceeded` (A limit of the plan or of the service is reached. `error.limit` names which.) `rejected` (The site was refused by the safety checks and cannot be updated.)","headers":{"Cache-Control":{"description":"Always `no-store`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"Error404":{"description":"An error. The `error.code` is one of: `not_found` (No such thing, or it belongs to somebody else.)","headers":{"Cache-Control":{"description":"Always `no-store`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"Error409":{"description":"An error. The `error.code` is one of: `conflict` (The request does not fit the current state, or another change was being finished. Read the message.) `upload_incomplete` (Files are missing or arrived with another size or hash. `error.missing` lists them.) `pending_review` (The site waits for a person to review it. Nothing can be changed until that is done.)","headers":{"Cache-Control":{"description":"Always `no-store`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"Error413":{"description":"An error. The `error.code` is one of: `too_large` (The request body is over its size limit.)","headers":{"Cache-Control":{"description":"Always `no-store`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"Error429":{"description":"An error. The `error.code` is one of: `rate_limited` (Too many requests. Wait for `Retry-After` seconds.)","headers":{"Cache-Control":{"description":"Always `no-store`.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds until the request budget is back.","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"Error501":{"description":"An error. The `error.code` is one of: `not_enabled` (This instance does not offer what was asked. Nothing was changed. Asking again changes nothing.)","headers":{"Cache-Control":{"description":"Always `no-store`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}},"Error503":{"description":"An error. The `error.code` is one of: `unavailable` (The service or its storage cannot answer now. Nothing was changed. Try again.)","headers":{"Cache-Control":{"description":"Always `no-store`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorBody"}}}}}}}