{"openapi":"3.1.0","info":{"title":"Malaf API","version":"1.2.0","description":"Free storage for agent plans, files, and static sites. Every write returns a short, shareable `url`.\n\n**Auth** is optional. Without it, links expire after 24 hours and count against per-IP limits. Send `Authorization: Bearer <api key>` for a workspace where links live 30 days and can be renewed.\n\n**Addresses.** Every site and plan lives at `{name}-{six random characters}` on its own host, for example `launch-plan-k3x9a2.malaf.dev`. The `slug` you send is the name; Malaf appends the suffix. Pass the full address back to republish, a bare name to create a new one. `POST /sites/{slug}/rotate` draws a new suffix and retires the old link at once.\n\n**Search visibility.** Every site and plan carries an `indexable` flag that says whether search engines may index it. The owner's setting wins when present: pass `indexable` at publish time or change it later with `PATCH /sites/{slug}`. Without a setting, workspace sites are indexable and plans are not. Anonymous work and password-protected pages are never indexable, whatever the flag says.\n\n**Limits.** Anonymous: 25 MiB/file, 10 MiB/site, 60 req/h. Workspace: 50 MiB/file, 200 MiB storage, 25 MiB/site, 50 sites, 2000 req/h. Workspace links live 30 days and renew on republish or from the dashboard.\n\nErrors always look like `{ error: { code, message, details? } }`. Rate-limit state is in `X-RateLimit-*` headers.","x-logo":{"url":"https://malaf.dev/icon.svg"}},"servers":[{"url":"https://malaf.dev/api/v1"}],"tags":[{"name":"Plans","description":"Publish Markdown, HTML, or text as a readable page"},{"name":"Files","description":"Upload, list, update, renew, and delete files"},{"name":"Sites","description":"Deploy, list, update, renew, roll back, and manage static sites and plans"},{"name":"Account"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Malaf API key"}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}},"File":{"type":"object","required":["id","shortId","url","shortUrl","previewUrl","downloadUrl","name","type","size"],"properties":{"id":{"type":"string","description":"Internal id"},"shortId":{"type":"string","description":"10-character public id used in links"},"url":{"type":"string","format":"uri","description":"Share this. Streams the file inline."},"shortUrl":{"type":"string","format":"uri"},"previewUrl":{"type":"string","format":"uri","description":"Rich preview page"},"downloadUrl":{"type":"string","format":"uri","description":"Forces a download"},"name":{"type":"string","description":"Display name"},"description":{"type":["string","null"],"description":"The owner's note, up to 500 characters"},"type":{"type":"string","description":"Detected MIME type"},"size":{"type":"integer"},"isPrivate":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":["string","null"],"format":"date-time"},"claimToken":{"type":["string","null"],"description":"Anonymous uploads only. POST it to /claim from a signed-in workspace to move the file into your workspace."},"duplicate":{"type":"boolean","description":"True when an identical file already existed"}}},"DeployResult":{"type":"object","required":["url","slug","kind","deploymentId","version","files","totalSize"],"properties":{"url":{"type":"string","format":"uri","description":"Share this."},"slug":{"type":"string","description":"The full address, `{name}-{suffix}`. Pass it back to republish."},"kind":{"type":"string","enum":["site","plan"]},"title":{"type":["string","null"]},"description":{"type":["string","null"],"description":"The owner's note, up to 500 characters"},"deploymentId":{"type":"string"},"version":{"type":"integer"},"files":{"type":"array","items":{"type":"string"}},"totalSize":{"type":"integer"},"passwordProtected":{"type":"boolean"},"indexable":{"type":"boolean","description":"Whether search engines may index it, after defaults and the password rule"},"expiresAt":{"type":["string","null"],"format":"date-time"},"claimToken":{"type":["string","null"]}}},"Site":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string","description":"The full address, `{name}-{suffix}`"},"kind":{"type":"string","enum":["site","plan"]},"title":{"type":["string","null"]},"description":{"type":["string","null"],"description":"The owner's note, up to 500 characters"},"url":{"type":"string","format":"uri"},"passwordProtected":{"type":"boolean"},"indexable":{"type":"boolean","description":"Whether search engines may index it, after defaults and the password rule"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":["string","null"],"format":"date-time"},"sourceUrl":{"type":["string","null"],"format":"uri","description":"Plans only: the source Markdown or text next to the rendered page. Null for sites."},"deployment":{"type":["object","null"],"properties":{"id":{"type":"string"},"version":{"type":"integer"},"status":{"type":"string"},"files":{"type":"array","items":{"type":"string"}},"totalSize":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}}}}}}},"security":[{"bearerAuth":[]},{}],"paths":{"/plans":{"post":{"tags":["Plans"],"operationId":"publishPlan","summary":"Publish a plan","description":"Turns Markdown, HTML, or plain text into a rendered page and returns its URL. Send JSON, a multipart `file`, or a raw text body. With a raw body, pass `title`, `description`, `slug`, and `indexable` as query parameters. Plans are capped at 4 MiB and hidden from search unless `indexable` is true. `slug` is a name; the plan comes back at `{name}-{suffix}`, and passing that full address back publishes a new version. Publishing a plan on an address that holds a site returns 409 `DUPLICATE_SLUG`.","parameters":[{"name":"title","in":"query","schema":{"type":"string"},"description":"Title, for raw-body requests"},{"name":"description","in":"query","schema":{"type":"string"},"description":"Note, for raw-body requests"},{"name":"slug","in":"query","schema":{"type":"string"},"description":"For raw-body requests. Address name, 3 to 41 lowercase letters, digits, and hyphens. Malaf appends a hyphen and six random characters, so the result is `{name}-{suffix}` and cannot be guessed. Pass the full address you were given to publish a new version of the same link; a bare name always creates a new address. Reserved names return 409."},{"name":"indexable","in":"query","schema":{"type":"boolean"},"description":"Search visibility, for raw-body requests (workspace only)"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string"},"markdown":{"type":"string"},"html":{"type":"string"},"text":{"type":"string"},"format":{"type":"string","enum":["auto","markdown","html","text"]},"title":{"type":"string"},"description":{"type":"string","description":"A one-line note, up to 500 characters. Shown in the dashboard, used as the meta description and social card text of the page."},"slug":{"type":"string","description":"Address name, 3 to 41 lowercase letters, digits, and hyphens. Malaf appends a hyphen and six random characters, so the result is `{name}-{suffix}` and cannot be guessed. Pass the full address you were given to publish a new version of the same link; a bare name always creates a new address. Reserved names return 409."},"password":{"type":"string"},"indexable":{"type":"boolean","description":"Let search engines index the page. Workspace only; ignored for anonymous work. Sites default to true, plans to false. A password always hides the page from search."}}},"example":{"markdown":"# Launch plan\n\n- [ ] Ship it","title":"Launch plan","description":"What ships this quarter and who owns each step.","slug":"launch-plan"}},"text/markdown":{"schema":{"type":"string"}},"text/html":{"schema":{"type":"string"}},"text/plain":{"schema":{"type":"string"}},"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"title":{"type":"string"},"description":{"type":"string","description":"A one-line note, up to 500 characters. Shown in the dashboard, used as the meta description and social card text of the page."},"slug":{"type":"string","description":"Address name, 3 to 41 lowercase letters, digits, and hyphens. Malaf appends a hyphen and six random characters, so the result is `{name}-{suffix}` and cannot be guessed. Pass the full address you were given to publish a new version of the same link; a bare name always creates a new address. Reserved names return 409."},"password":{"type":"string"},"format":{"type":"string","enum":["markdown","html","text"]},"indexable":{"type":"string","enum":["true","false"],"description":"Let search engines index the page. Workspace only; ignored for anonymous work. Sites default to true, plans to false. A password always hides the page from search."}}}}}},"responses":{"201":{"description":"Published","content":{"application/json":{"schema":{"type":"object","required":["url","slug","kind","deploymentId","version","files","totalSize"],"properties":{"url":{"type":"string","format":"uri","description":"Share this."},"slug":{"type":"string","description":"The full address, `{name}-{suffix}`. Pass it back to republish."},"kind":{"type":"string","enum":["site","plan"]},"title":{"type":["string","null"]},"description":{"type":["string","null"],"description":"The owner's note, up to 500 characters"},"deploymentId":{"type":"string"},"version":{"type":"integer"},"files":{"type":"array","items":{"type":"string"}},"totalSize":{"type":"integer"},"passwordProtected":{"type":"boolean"},"indexable":{"type":"boolean","description":"Whether search engines may index it, after defaults and the password rule"},"expiresAt":{"type":["string","null"],"format":"date-time"},"claimToken":{"type":["string","null"]}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"403":{"description":"Forbidden or quota exceeded","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"404":{"description":"Not found, expired, or not yours","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"409":{"description":"Address holds the other kind, or the name is reserved","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"429":{"description":"Rate limited. Honour Retry-After.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"503":{"description":"Storage unavailable. Safe to retry after a few seconds.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}}}},"get":{"tags":["Plans"],"operationId":"listPlans","summary":"List plans","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","default":50,"minimum":1,"maximum":200}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Pass the previous response's nextCursor to get the next page."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"plans":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string","description":"The full address, `{name}-{suffix}`"},"kind":{"type":"string","enum":["site","plan"]},"title":{"type":["string","null"]},"description":{"type":["string","null"],"description":"The owner's note, up to 500 characters"},"url":{"type":"string","format":"uri"},"passwordProtected":{"type":"boolean"},"indexable":{"type":"boolean","description":"Whether search engines may index it, after defaults and the password rule"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":["string","null"],"format":"date-time"},"sourceUrl":{"type":["string","null"],"format":"uri","description":"Plans only: the source Markdown or text next to the rendered page. Null for sites."},"deployment":{"type":["object","null"],"properties":{"id":{"type":"string"},"version":{"type":"integer"},"status":{"type":"string"},"files":{"type":"array","items":{"type":"string"}},"totalSize":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}}}}}},"count":{"type":"integer"},"nextCursor":{"type":["string","null"]}}}}}}}}},"/upload":{"post":{"tags":["Files"],"operationId":"uploadFile","parameters":[{"name":"filename","in":"query","schema":{"type":"string"},"description":"Name for raw-body uploads (or send X-Filename)"},{"name":"private","in":"query","schema":{"type":"boolean"},"description":"Owner-only file, for raw-body uploads"},{"name":"Idempotency-Key","in":"header","schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,200}$"},"description":"Replay-safe retries: the same key returns the same record"}],"summary":"Upload a file","description":"Multipart field `file` (optional `private=true`, `tags=a,b`, `name`, `description`), or a raw body with an `X-Filename` header (`?name=&description=` for details). For files above a few MiB prefer the presigned flow. Supports `Idempotency-Key`.","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary"},"private":{"type":"string","enum":["true","false"]},"tags":{"type":"string"},"name":{"type":"string","description":"Display name; defaults to the filename"},"description":{"type":"string","description":"A one-line note, up to 500 characters. Shown in the dashboard, used as the meta description and social card text of the page."}}}},"application/octet-stream":{"schema":{"type":"string","contentMediaType":"application/octet-stream"}}}},"responses":{"201":{"description":"Uploaded","content":{"application/json":{"schema":{"type":"object","required":["id","shortId","url","shortUrl","previewUrl","downloadUrl","name","type","size"],"properties":{"id":{"type":"string","description":"Internal id"},"shortId":{"type":"string","description":"10-character public id used in links"},"url":{"type":"string","format":"uri","description":"Share this. Streams the file inline."},"shortUrl":{"type":"string","format":"uri"},"previewUrl":{"type":"string","format":"uri","description":"Rich preview page"},"downloadUrl":{"type":"string","format":"uri","description":"Forces a download"},"name":{"type":"string","description":"Display name"},"description":{"type":["string","null"],"description":"The owner's note, up to 500 characters"},"type":{"type":"string","description":"Detected MIME type"},"size":{"type":"integer"},"isPrivate":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":["string","null"],"format":"date-time"},"claimToken":{"type":["string","null"],"description":"Anonymous uploads only. POST it to /claim from a signed-in workspace to move the file into your workspace."},"duplicate":{"type":"boolean","description":"True when an identical file already existed"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"403":{"description":"Forbidden or quota exceeded","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"404":{"description":"Not found, expired, or not yours","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"409":{"description":"Address holds the other kind, or the name is reserved","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"429":{"description":"Rate limited. Honour Retry-After.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"503":{"description":"Storage unavailable. Safe to retry after a few seconds.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}}}}},"/upload/batch":{"post":{"tags":["Files"],"operationId":"uploadBatch","summary":"Upload up to 50 files","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"string","format":"binary"}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object"}},"summary":{"type":"object","properties":{"total":{"type":"integer"},"succeeded":{"type":"integer"},"failed":{"type":"integer"}}}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"403":{"description":"Forbidden or quota exceeded","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"404":{"description":"Not found, expired, or not yours","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"409":{"description":"Address holds the other kind, or the name is reserved","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"429":{"description":"Rate limited. Honour Retry-After.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"503":{"description":"Storage unavailable. Safe to retry after a few seconds.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}}}}},"/upload/presign":{"post":{"tags":["Files"],"operationId":"presignUpload","summary":"Start a direct upload (large files)","description":"Reserves quota and returns a presigned `uploadUrl`. PUT the raw bytes there with the returned headers, then call `/upload/complete`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["filename","size"],"properties":{"filename":{"type":"string"},"size":{"type":"integer"},"name":{"type":"string","description":"Display name; defaults to the filename"},"description":{"type":"string","description":"A one-line note, up to 500 characters. Shown in the dashboard, used as the meta description and social card text of the page."},"tags":{"type":"array","items":{"type":"string"}},"type":{"type":"string"},"private":{"type":"boolean"}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"uploadId":{"type":"string"},"uploadUrl":{"type":"string","format":"uri"},"method":{"type":"string","enum":["PUT"]},"headers":{"type":"object","additionalProperties":{"type":"string"}},"expiresAt":{"type":"string","format":"date-time"},"maxBytes":{"type":"integer"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"403":{"description":"Forbidden or quota exceeded","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"404":{"description":"Not found, expired, or not yours","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"409":{"description":"Address holds the other kind, or the name is reserved","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"429":{"description":"Rate limited. Honour Retry-After.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"503":{"description":"Storage unavailable. Safe to retry after a few seconds.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}}}}},"/upload/complete":{"post":{"tags":["Files"],"operationId":"completeUpload","summary":"Finish a direct upload","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["uploadId"],"properties":{"uploadId":{"type":"string"}}}}}},"responses":{"201":{"description":"Stored","content":{"application/json":{"schema":{"type":"object","required":["id","shortId","url","shortUrl","previewUrl","downloadUrl","name","type","size"],"properties":{"id":{"type":"string","description":"Internal id"},"shortId":{"type":"string","description":"10-character public id used in links"},"url":{"type":"string","format":"uri","description":"Share this. Streams the file inline."},"shortUrl":{"type":"string","format":"uri"},"previewUrl":{"type":"string","format":"uri","description":"Rich preview page"},"downloadUrl":{"type":"string","format":"uri","description":"Forces a download"},"name":{"type":"string","description":"Display name"},"description":{"type":["string","null"],"description":"The owner's note, up to 500 characters"},"type":{"type":"string","description":"Detected MIME type"},"size":{"type":"integer"},"isPrivate":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":["string","null"],"format":"date-time"},"claimToken":{"type":["string","null"],"description":"Anonymous uploads only. POST it to /claim from a signed-in workspace to move the file into your workspace."},"duplicate":{"type":"boolean","description":"True when an identical file already existed"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"403":{"description":"Forbidden or quota exceeded","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"404":{"description":"Not found, expired, or not yours","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"409":{"description":"Address holds the other kind, or the name is reserved","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"429":{"description":"Rate limited. Honour Retry-After.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"503":{"description":"Storage unavailable. Safe to retry after a few seconds.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}}}},"delete":{"tags":["Files"],"operationId":"cancelUpload","summary":"Cancel a direct upload","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"uploadId":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/files":{"get":{"tags":["Files"],"operationId":"listFiles","summary":"List files","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","default":50,"maximum":200}},{"name":"mime","in":"query","schema":{"type":"string"},"description":"e.g. image"},{"name":"q","in":"query","schema":{"type":"string"},"description":"Name search"},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Value of `cursor` from the previous page"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","required":["id","shortId","url","shortUrl","previewUrl","downloadUrl","name","type","size"],"properties":{"id":{"type":"string","description":"Internal id"},"shortId":{"type":"string","description":"10-character public id used in links"},"url":{"type":"string","format":"uri","description":"Share this. Streams the file inline."},"shortUrl":{"type":"string","format":"uri"},"previewUrl":{"type":"string","format":"uri","description":"Rich preview page"},"downloadUrl":{"type":"string","format":"uri","description":"Forces a download"},"name":{"type":"string","description":"Display name"},"description":{"type":["string","null"],"description":"The owner's note, up to 500 characters"},"type":{"type":"string","description":"Detected MIME type"},"size":{"type":"integer"},"isPrivate":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":["string","null"],"format":"date-time"},"claimToken":{"type":["string","null"],"description":"Anonymous uploads only. POST it to /claim from a signed-in workspace to move the file into your workspace."},"duplicate":{"type":"boolean","description":"True when an identical file already existed"}}}},"count":{"type":"integer"},"cursor":{"type":["string","null"],"description":"Pass back to fetch the next page; null at the end"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"403":{"description":"Forbidden or quota exceeded","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"404":{"description":"Not found, expired, or not yours","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"409":{"description":"Address holds the other kind, or the name is reserved","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"429":{"description":"Rate limited. Honour Retry-After.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"503":{"description":"Storage unavailable. Safe to retry after a few seconds.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}}}}},"/files/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["Files"],"operationId":"getFile","summary":"Get a file","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["id","shortId","url","shortUrl","previewUrl","downloadUrl","name","type","size"],"properties":{"id":{"type":"string","description":"Internal id"},"shortId":{"type":"string","description":"10-character public id used in links"},"url":{"type":"string","format":"uri","description":"Share this. Streams the file inline."},"shortUrl":{"type":"string","format":"uri"},"previewUrl":{"type":"string","format":"uri","description":"Rich preview page"},"downloadUrl":{"type":"string","format":"uri","description":"Forces a download"},"name":{"type":"string","description":"Display name"},"description":{"type":["string","null"],"description":"The owner's note, up to 500 characters"},"type":{"type":"string","description":"Detected MIME type"},"size":{"type":"integer"},"isPrivate":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":["string","null"],"format":"date-time"},"claimToken":{"type":["string","null"],"description":"Anonymous uploads only. POST it to /claim from a signed-in workspace to move the file into your workspace."},"duplicate":{"type":"boolean","description":"True when an identical file already existed"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"403":{"description":"Forbidden or quota exceeded","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"404":{"description":"Not found, expired, or not yours","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"409":{"description":"Address holds the other kind, or the name is reserved","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"429":{"description":"Rate limited. Honour Retry-After.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"503":{"description":"Storage unavailable. Safe to retry after a few seconds.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}}}},"patch":{"tags":["Files"],"operationId":"updateFile","summary":"Rename, describe, tag, or change privacy","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":["string","null"],"description":"New note, up to 500 characters; null or empty clears it"},"tags":{"type":"array","items":{"type":"string"}},"private":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["id","shortId","url","shortUrl","previewUrl","downloadUrl","name","type","size"],"properties":{"id":{"type":"string","description":"Internal id"},"shortId":{"type":"string","description":"10-character public id used in links"},"url":{"type":"string","format":"uri","description":"Share this. Streams the file inline."},"shortUrl":{"type":"string","format":"uri"},"previewUrl":{"type":"string","format":"uri","description":"Rich preview page"},"downloadUrl":{"type":"string","format":"uri","description":"Forces a download"},"name":{"type":"string","description":"Display name"},"description":{"type":["string","null"],"description":"The owner's note, up to 500 characters"},"type":{"type":"string","description":"Detected MIME type"},"size":{"type":"integer"},"isPrivate":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":["string","null"],"format":"date-time"},"claimToken":{"type":["string","null"],"description":"Anonymous uploads only. POST it to /claim from a signed-in workspace to move the file into your workspace."},"duplicate":{"type":"boolean","description":"True when an identical file already existed"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"403":{"description":"Forbidden or quota exceeded","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"404":{"description":"Not found, expired, or not yours","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"409":{"description":"Address holds the other kind, or the name is reserved","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"429":{"description":"Rate limited. Honour Retry-After.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"503":{"description":"Storage unavailable. Safe to retry after a few seconds.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}}}},"delete":{"tags":["Files"],"operationId":"deleteFile","summary":"Delete a file","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"403":{"description":"Forbidden or quota exceeded","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"404":{"description":"Not found, expired, or not yours","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"409":{"description":"Address holds the other kind, or the name is reserved","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"429":{"description":"Rate limited. Honour Retry-After.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"503":{"description":"Storage unavailable. Safe to retry after a few seconds.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}}}}},"/files/{id}/renew":{"post":{"tags":["Files"],"operationId":"renewFile","summary":"Reset a file's lifetime to a full window from now","description":"Workspace files live 30 days from their last update. Renewing starts that window again. Returns the record with the new `expiresAt`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Renewed","content":{"application/json":{"schema":{"type":"object","required":["id","shortId","url","shortUrl","previewUrl","downloadUrl","name","type","size"],"properties":{"id":{"type":"string","description":"Internal id"},"shortId":{"type":"string","description":"10-character public id used in links"},"url":{"type":"string","format":"uri","description":"Share this. Streams the file inline."},"shortUrl":{"type":"string","format":"uri"},"previewUrl":{"type":"string","format":"uri","description":"Rich preview page"},"downloadUrl":{"type":"string","format":"uri","description":"Forces a download"},"name":{"type":"string","description":"Display name"},"description":{"type":["string","null"],"description":"The owner's note, up to 500 characters"},"type":{"type":"string","description":"Detected MIME type"},"size":{"type":"integer"},"isPrivate":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":["string","null"],"format":"date-time"},"claimToken":{"type":["string","null"],"description":"Anonymous uploads only. POST it to /claim from a signed-in workspace to move the file into your workspace."},"duplicate":{"type":"boolean","description":"True when an identical file already existed"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"403":{"description":"Forbidden or quota exceeded","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"404":{"description":"Not found, expired, or not yours","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"409":{"description":"Address holds the other kind, or the name is reserved","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"429":{"description":"Rate limited. Honour Retry-After.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"503":{"description":"Storage unavailable. Safe to retry after a few seconds.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}}}}},"/files/{id}/sign":{"post":{"tags":["Files"],"operationId":"signFile","summary":"Time-limited direct link (works for private files)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expiresInSeconds":{"type":"integer","default":3600,"maximum":604800}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"expiresInSeconds":{"type":"integer"},"expiresAt":{"type":"string","format":"date-time"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"403":{"description":"Forbidden or quota exceeded","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"404":{"description":"Not found, expired, or not yours","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"409":{"description":"Address holds the other kind, or the name is reserved","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"429":{"description":"Rate limited. Honour Retry-After.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"503":{"description":"Storage unavailable. Safe to retry after a few seconds.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}}}}},"/sites/deploy":{"post":{"tags":["Sites"],"operationId":"deploySite","summary":"Deploy a static site","description":"JSON `{ files: { path: content } }` where text files are strings and binaries are `{ content, encoding: \"base64\" }`, multipart (each field name is a path, or `file` = ZIP), or a raw ZIP body. An `index.html` is required. With a raw ZIP, pass `slug`, `title`, and `indexable` as query parameters. `slug` is a name; the site comes back at `{name}-{suffix}`. Deploying again with that full address creates a new version; roll back any time. Deploying a site on an address that holds a plan returns 409 `DUPLICATE_SLUG`.","parameters":[{"name":"slug","in":"query","schema":{"type":"string"},"description":"For raw ZIP bodies. Address name, 3 to 41 lowercase letters, digits, and hyphens. Malaf appends a hyphen and six random characters, so the result is `{name}-{suffix}` and cannot be guessed. Pass the full address you were given to publish a new version of the same link; a bare name always creates a new address. Reserved names return 409."},{"name":"title","in":"query","schema":{"type":"string"},"description":"Title, for raw ZIP bodies"},{"name":"indexable","in":"query","schema":{"type":"boolean"},"description":"Search visibility, for raw ZIP bodies (workspace only)"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["files"],"properties":{"files":{"type":"object","description":"Path to content. Text files are strings; binaries are objects with base64 content.","additionalProperties":{"oneOf":[{"type":"string"},{"type":"object","required":["content","encoding"],"properties":{"content":{"type":"string","description":"Base64 bytes"},"encoding":{"type":"string","enum":["base64"]}}}]}},"slug":{"type":"string","description":"Address name, 3 to 41 lowercase letters, digits, and hyphens. Malaf appends a hyphen and six random characters, so the result is `{name}-{suffix}` and cannot be guessed. Pass the full address you were given to publish a new version of the same link; a bare name always creates a new address. Reserved names return 409."},"title":{"type":"string"},"description":{"type":"string","description":"A one-line note, up to 500 characters. Shown in the dashboard, used as the meta description and social card text of the page."},"password":{"type":"string"},"indexable":{"type":"boolean","description":"Let search engines index the page. Workspace only; ignored for anonymous work. Sites default to true, plans to false. A password always hides the page from search."}}},"example":{"files":{"index.html":"<h1>Hello</h1>","logo.png":{"content":"iVBORw0KGgo=","encoding":"base64"}},"slug":"my-demo"}},"multipart/form-data":{"schema":{"type":"object","description":"Every other field name is a file path; `file` may be a ZIP","properties":{"file":{"type":"string","format":"binary"},"slug":{"type":"string","description":"Address name, 3 to 41 lowercase letters, digits, and hyphens. Malaf appends a hyphen and six random characters, so the result is `{name}-{suffix}` and cannot be guessed. Pass the full address you were given to publish a new version of the same link; a bare name always creates a new address. Reserved names return 409."},"title":{"type":"string"},"description":{"type":"string","description":"A one-line note, up to 500 characters. Shown in the dashboard, used as the meta description and social card text of the page."},"password":{"type":"string"},"indexable":{"type":"string","enum":["true","false"],"description":"Let search engines index the page. Workspace only; ignored for anonymous work. Sites default to true, plans to false. A password always hides the page from search."}},"additionalProperties":true}},"application/zip":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"Deployed","content":{"application/json":{"schema":{"type":"object","required":["url","slug","kind","deploymentId","version","files","totalSize"],"properties":{"url":{"type":"string","format":"uri","description":"Share this."},"slug":{"type":"string","description":"The full address, `{name}-{suffix}`. Pass it back to republish."},"kind":{"type":"string","enum":["site","plan"]},"title":{"type":["string","null"]},"description":{"type":["string","null"],"description":"The owner's note, up to 500 characters"},"deploymentId":{"type":"string"},"version":{"type":"integer"},"files":{"type":"array","items":{"type":"string"}},"totalSize":{"type":"integer"},"passwordProtected":{"type":"boolean"},"indexable":{"type":"boolean","description":"Whether search engines may index it, after defaults and the password rule"},"expiresAt":{"type":["string","null"],"format":"date-time"},"claimToken":{"type":["string","null"]}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"403":{"description":"Forbidden or quota exceeded","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"404":{"description":"Not found, expired, or not yours","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"409":{"description":"Address holds the other kind, or the name is reserved","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"429":{"description":"Rate limited. Honour Retry-After.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"503":{"description":"Storage unavailable. Safe to retry after a few seconds.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}}}}},"/sites/deploy/begin":{"post":{"tags":["Sites"],"operationId":"beginDirectDeploy","summary":"Start a direct deployment (large sites)","description":"Declare files up front and receive a presigned PUT URL per file. Upload each, then call `/sites/deploy/commit`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["files"],"properties":{"files":{"type":"array","items":{"type":"object","required":["path","size"],"properties":{"path":{"type":"string"},"size":{"type":"integer"},"type":{"type":"string"}}}},"slug":{"type":"string","description":"Address name, 3 to 41 lowercase letters, digits, and hyphens. Malaf appends a hyphen and six random characters, so the result is `{name}-{suffix}` and cannot be guessed. Pass the full address you were given to publish a new version of the same link; a bare name always creates a new address. Reserved names return 409."},"title":{"type":"string"},"description":{"type":"string","description":"A one-line note, up to 500 characters. Shown in the dashboard, used as the meta description and social card text of the page."},"password":{"type":"string"},"indexable":{"type":"boolean","description":"Let search engines index the page. Workspace only; ignored for anonymous work. Sites default to true, plans to false. A password always hides the page from search."}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deploymentId":{"type":"string"},"slug":{"type":"string"},"url":{"type":"string"},"version":{"type":"integer"},"uploads":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"uploadUrl":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}}}}}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"403":{"description":"Forbidden or quota exceeded","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"404":{"description":"Not found, expired, or not yours","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"409":{"description":"Address holds the other kind, or the name is reserved","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"429":{"description":"Rate limited. Honour Retry-After.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"503":{"description":"Storage unavailable. Safe to retry after a few seconds.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}}}}},"/sites/deploy/commit":{"post":{"tags":["Sites"],"operationId":"commitDirectDeploy","summary":"Finish a direct deployment","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["deploymentId","files"],"properties":{"deploymentId":{"type":"string"},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"size":{"type":"integer"}}}}}}}}},"responses":{"201":{"description":"Live","content":{"application/json":{"schema":{"type":"object","required":["url","slug","kind","deploymentId","version","files","totalSize"],"properties":{"url":{"type":"string","format":"uri","description":"Share this."},"slug":{"type":"string","description":"The full address, `{name}-{suffix}`. Pass it back to republish."},"kind":{"type":"string","enum":["site","plan"]},"title":{"type":["string","null"]},"description":{"type":["string","null"],"description":"The owner's note, up to 500 characters"},"deploymentId":{"type":"string"},"version":{"type":"integer"},"files":{"type":"array","items":{"type":"string"}},"totalSize":{"type":"integer"},"passwordProtected":{"type":"boolean"},"indexable":{"type":"boolean","description":"Whether search engines may index it, after defaults and the password rule"},"expiresAt":{"type":["string","null"],"format":"date-time"},"claimToken":{"type":["string","null"]}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"403":{"description":"Forbidden or quota exceeded","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"404":{"description":"Not found, expired, or not yours","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"409":{"description":"Address holds the other kind, or the name is reserved","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"429":{"description":"Rate limited. Honour Retry-After.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"503":{"description":"Storage unavailable. Safe to retry after a few seconds.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}}}},"delete":{"tags":["Sites"],"operationId":"cancelDirectDeploy","summary":"Abandon a direct deployment","description":"Drops a pending deployment started with `/sites/deploy/begin` and releases its reserved quota. `cancelled` is false when nothing pending matched.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["deploymentId"],"properties":{"deploymentId":{"type":"string"}}}}}},"responses":{"200":{"description":"Cancelled","content":{"application/json":{"schema":{"type":"object","required":["cancelled","deploymentId"],"properties":{"cancelled":{"type":"boolean"},"deploymentId":{"type":"string"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"403":{"description":"Forbidden or quota exceeded","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"404":{"description":"Not found, expired, or not yours","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"409":{"description":"Address holds the other kind, or the name is reserved","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"429":{"description":"Rate limited. Honour Retry-After.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"503":{"description":"Storage unavailable. Safe to retry after a few seconds.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}}}}},"/sites":{"get":{"tags":["Sites"],"operationId":"listSites","summary":"List sites","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","default":50,"minimum":1,"maximum":200}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Pass the previous response's nextCursor to get the next page."},{"name":"kind","in":"query","schema":{"type":"string","enum":["site","plan"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"sites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string","description":"The full address, `{name}-{suffix}`"},"kind":{"type":"string","enum":["site","plan"]},"title":{"type":["string","null"]},"description":{"type":["string","null"],"description":"The owner's note, up to 500 characters"},"url":{"type":"string","format":"uri"},"passwordProtected":{"type":"boolean"},"indexable":{"type":"boolean","description":"Whether search engines may index it, after defaults and the password rule"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":["string","null"],"format":"date-time"},"sourceUrl":{"type":["string","null"],"format":"uri","description":"Plans only: the source Markdown or text next to the rendered page. Null for sites."},"deployment":{"type":["object","null"],"properties":{"id":{"type":"string"},"version":{"type":"integer"},"status":{"type":"string"},"files":{"type":"array","items":{"type":"string"}},"totalSize":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}}}}}},"count":{"type":"integer"},"nextCursor":{"type":["string","null"]}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"403":{"description":"Forbidden or quota exceeded","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"404":{"description":"Not found, expired, or not yours","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"409":{"description":"Address holds the other kind, or the name is reserved","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"429":{"description":"Rate limited. Honour Retry-After.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"503":{"description":"Storage unavailable. Safe to retry after a few seconds.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}}}}},"/sites/{slug}":{"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["Sites"],"operationId":"getSite","summary":"Get a site with its live manifest","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string","description":"The full address, `{name}-{suffix}`"},"kind":{"type":"string","enum":["site","plan"]},"title":{"type":["string","null"]},"description":{"type":["string","null"],"description":"The owner's note, up to 500 characters"},"url":{"type":"string","format":"uri"},"passwordProtected":{"type":"boolean"},"indexable":{"type":"boolean","description":"Whether search engines may index it, after defaults and the password rule"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":["string","null"],"format":"date-time"},"sourceUrl":{"type":["string","null"],"format":"uri","description":"Plans only: the source Markdown or text next to the rendered page. Null for sites."},"deployment":{"type":["object","null"],"properties":{"id":{"type":"string"},"version":{"type":"integer"},"status":{"type":"string"},"files":{"type":"array","items":{"type":"string"}},"totalSize":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}}}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"403":{"description":"Forbidden or quota exceeded","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"404":{"description":"Not found, expired, or not yours","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"409":{"description":"Address holds the other kind, or the name is reserved","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"429":{"description":"Rate limited. Honour Retry-After.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"503":{"description":"Storage unavailable. Safe to retry after a few seconds.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}}}},"patch":{"tags":["Sites"],"operationId":"updateSite","summary":"Change the title, description, address name, password, or search visibility","description":"Send at least one field. Works for plans too. Returns the full site record; after a `name` change, `slug` and `url` are the new address and the old one stops working at once.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","minProperties":1,"properties":{"title":{"type":["string","null"],"description":"New title; null or empty clears it"},"description":{"type":["string","null"],"description":"New note, up to 500 characters; null or empty clears it"},"name":{"type":"string","description":"New address name, 3 to 41 lowercase letters, digits, and hyphens. The six-character suffix stays: launch-plan-k3x9a2 becomes spring-launch-k3x9a2. Reserved names return 409."},"password":{"type":["string","null"],"description":"Set a password (workspace only); null or empty removes it"},"indexable":{"type":"boolean","description":"Let search engines index the page. Workspace only; ignored for anonymous work. Sites default to true, plans to false. A password always hides the page from search."}}},"example":{"title":"Spring launch","name":"spring-launch"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string","description":"The full address, `{name}-{suffix}`"},"kind":{"type":"string","enum":["site","plan"]},"title":{"type":["string","null"]},"description":{"type":["string","null"],"description":"The owner's note, up to 500 characters"},"url":{"type":"string","format":"uri"},"passwordProtected":{"type":"boolean"},"indexable":{"type":"boolean","description":"Whether search engines may index it, after defaults and the password rule"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":["string","null"],"format":"date-time"},"sourceUrl":{"type":["string","null"],"format":"uri","description":"Plans only: the source Markdown or text next to the rendered page. Null for sites."},"deployment":{"type":["object","null"],"properties":{"id":{"type":"string"},"version":{"type":"integer"},"status":{"type":"string"},"files":{"type":"array","items":{"type":"string"}},"totalSize":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}}}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"403":{"description":"Forbidden or quota exceeded","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"404":{"description":"Not found, expired, or not yours","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"409":{"description":"Address holds the other kind, or the name is reserved","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"429":{"description":"Rate limited. Honour Retry-After.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"503":{"description":"Storage unavailable. Safe to retry after a few seconds.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}}}},"delete":{"tags":["Sites"],"operationId":"deleteSite","summary":"Delete a site","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"},"slug":{"type":"string"},"deletedAt":{"type":"string","format":"date-time"}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"403":{"description":"Forbidden or quota exceeded","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"404":{"description":"Not found, expired, or not yours","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"409":{"description":"Address holds the other kind, or the name is reserved","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"429":{"description":"Rate limited. Honour Retry-After.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"503":{"description":"Storage unavailable. Safe to retry after a few seconds.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}}}}},"/sites/{slug}/renew":{"post":{"tags":["Sites"],"operationId":"renewSite","summary":"Reset a site's lifetime to a full window from now","description":"Workspace sites and plans live 30 days from their last update. Renewing starts that window again. Returns the site record with the new `expiresAt`.","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Renewed","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string","description":"The full address, `{name}-{suffix}`"},"kind":{"type":"string","enum":["site","plan"]},"title":{"type":["string","null"]},"description":{"type":["string","null"],"description":"The owner's note, up to 500 characters"},"url":{"type":"string","format":"uri"},"passwordProtected":{"type":"boolean"},"indexable":{"type":"boolean","description":"Whether search engines may index it, after defaults and the password rule"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":["string","null"],"format":"date-time"},"sourceUrl":{"type":["string","null"],"format":"uri","description":"Plans only: the source Markdown or text next to the rendered page. Null for sites."},"deployment":{"type":["object","null"],"properties":{"id":{"type":"string"},"version":{"type":"integer"},"status":{"type":"string"},"files":{"type":"array","items":{"type":"string"}},"totalSize":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}}}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"403":{"description":"Forbidden or quota exceeded","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"404":{"description":"Not found, expired, or not yours","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"409":{"description":"Address holds the other kind, or the name is reserved","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"429":{"description":"Rate limited. Honour Retry-After.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"503":{"description":"Storage unavailable. Safe to retry after a few seconds.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}}}}},"/sites/{slug}/versions":{"get":{"tags":["Sites"],"operationId":"listSiteVersions","summary":"List every kept version","description":"Newest first. Pass a `version` from here to `/sites/{slug}/rollback`.","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["slug","url","versions"],"properties":{"slug":{"type":"string"},"url":{"type":"string","format":"uri"},"versions":{"type":"array","description":"Newest first","items":{"type":"object","required":["version","status","files","totalSize","createdAt"],"properties":{"version":{"type":"integer"},"status":{"type":"string","enum":["live","superseded"]},"files":{"type":"array","items":{"type":"string"}},"totalSize":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}}}}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"403":{"description":"Forbidden or quota exceeded","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"404":{"description":"Not found, expired, or not yours","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"409":{"description":"Address holds the other kind, or the name is reserved","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"429":{"description":"Rate limited. Honour Retry-After.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"503":{"description":"Storage unavailable. Safe to retry after a few seconds.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}}}}},"/sites/{slug}/rollback":{"post":{"tags":["Sites"],"operationId":"rollbackSite","summary":"Restore a previous version","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"integer"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string"},"url":{"type":"string","format":"uri"},"version":{"type":"integer"},"files":{"type":"array","items":{"type":"string"}}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"403":{"description":"Forbidden or quota exceeded","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"404":{"description":"Not found, expired, or not yours","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"409":{"description":"Address holds the other kind, or the name is reserved","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"429":{"description":"Rate limited. Honour Retry-After.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"503":{"description":"Storage unavailable. Safe to retry after a few seconds.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}}}}},"/sites/{slug}/rotate":{"post":{"tags":["Sites"],"operationId":"rotateSite","summary":"Give a site or plan a new random address","description":"Keeps the name and draws a new six character suffix. The old link stops working immediately. Needs the upload scope. Returns the site record at its new address plus `previousSlug`.","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Rotated","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string","description":"The full address, `{name}-{suffix}`"},"kind":{"type":"string","enum":["site","plan"]},"title":{"type":["string","null"]},"description":{"type":["string","null"],"description":"The owner's note, up to 500 characters"},"url":{"type":"string","format":"uri"},"passwordProtected":{"type":"boolean"},"indexable":{"type":"boolean","description":"Whether search engines may index it, after defaults and the password rule"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"expiresAt":{"type":["string","null"],"format":"date-time"},"sourceUrl":{"type":["string","null"],"format":"uri","description":"Plans only: the source Markdown or text next to the rendered page. Null for sites."},"deployment":{"type":["object","null"],"properties":{"id":{"type":"string"},"version":{"type":"integer"},"status":{"type":"string"},"files":{"type":"array","items":{"type":"string"}},"totalSize":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}}},"previousSlug":{"type":"string","description":"The address that just stopped working"}},"required":["slug","url","previousSlug"]}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"403":{"description":"Forbidden or quota exceeded","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"404":{"description":"Not found, expired, or not yours","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"409":{"description":"Address holds the other kind, or the name is reserved","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"429":{"description":"Rate limited. Honour Retry-After.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"503":{"description":"Storage unavailable. Safe to retry after a few seconds.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}}}}},"/claim":{"post":{"tags":["Account"],"operationId":"claim","summary":"Move anonymous links into your workspace","description":"Requires a workspace (API key or session). Pass the `claimToken` values returned by anonymous uploads or deployments.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tokens":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"claimed":{"type":"integer"},"results":{"type":"array","items":{"type":"object"}}}}}}},"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"403":{"description":"Forbidden or quota exceeded","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"404":{"description":"Not found, expired, or not yours","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"409":{"description":"Address holds the other kind, or the name is reserved","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"413":{"description":"Too large","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"429":{"description":"Rate limited. Honour Retry-After.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}},"503":{"description":"Storage unavailable. Safe to retry after a few seconds.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}}}}},"/whoami":{"get":{"tags":["Account"],"operationId":"whoami","summary":"Inspect the current actor, limits, and usage","description":"Who the request acts as, the key's scopes, the exact limits that apply, and what the owner currently holds. Free of the hourly budget, so check it before a batch.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"authenticated":{"type":"boolean"},"ownerType":{"type":"string","enum":["anonymous","user"]},"tier":{"type":"string","enum":["anonymous","free","pro"]},"scopes":{"type":"array","items":{"type":"string"}},"limits":{"type":"object","description":"Bytes and counts; null means unlimited","additionalProperties":true},"usage":{"type":"object","description":"What the owner holds right now","required":["storageUsedBytes","files","sites","plans"],"properties":{"storageUsedBytes":{"type":"integer"},"files":{"type":"integer"},"sites":{"type":"integer"},"plans":{"type":"integer"}}},"docs":{"type":"string","format":"uri","description":"The agent skill document"},"openapi":{"type":"string","format":"uri","description":"This contract"}}}}}},"401":{"description":"Invalid API key","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["UNAUTHORIZED","FORBIDDEN","QUOTA_EXCEEDED","NOT_FOUND","VALIDATION_ERROR","PAYLOAD_TOO_LARGE","RATE_LIMITED","STORAGE_UNAVAILABLE","DUPLICATE_SLUG","INTERNAL"]},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}}}}}}}