{"openapi":"3.1.0","info":{"title":"BigAngels API","version":"1","description":"Instant hosting for anything made with an AI agent. Publish in three calls: create (POST /publish), PUT each file to its signed upload URL, then finalize.\n\nNo account is needed: an anonymous publish is a public preview with a private claimToken. It goes offline after 6 hours and can be claimed (POST /claim) for 7 days after that, which brings it back.\n\nSign in right in the chat to keep sites: POST /auth/request-code with the person's email, ask them for the code from their inbox, then POST /auth/verify-code. The reply has an apiKey: store it privately and send it as Authorization: Bearer <key>. Never show it in the chat.\n\nAgents that can't make HTTP requests can use the MCP server at https://api.bigangels.app/mcp (OAuth). Docs: https://bigangels.app/docs.md. Index for agents: https://bigangels.app/llms.txt.\n\nSend X-BigAngels-Client: <your-agent>/<tool> on every request so the owner's dashboard shows who published.","contact":{"url":"https://bigangels.app/docs"}},"servers":[{"url":"https://api.bigangels.app/api/v1"}],"externalDocs":{"url":"https://bigangels.app/docs.md","description":"Full docs as Markdown"},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"An API key (ba_live_…) from /auth/verify-code or Settings → API keys."},"claimToken":{"type":"apiKey","in":"header","name":"X-Claim-Token","description":"The private claimToken returned when creating an anonymous preview. Used to read that preview's files."}},"parameters":{"client":{"name":"X-BigAngels-Client","in":"header","required":false,"description":"Who is publishing, e.g. claude-code/publish-sh.","schema":{"type":"string"}}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable message."},"code":{"type":"string","description":"Stable machine-readable code."},"details":{"type":"object"}},"required":["error","code"]}}},"tags":[{"name":"Sign in","description":"Email-code sign-in from the chat."},{"name":"Publish"},{"name":"Sites"},{"name":"Files","description":"Read what's live, to edit and republish."},{"name":"Versions"},{"name":"Access"},{"name":"Site Data"},{"name":"Variables & proxy"},{"name":"Organise"},{"name":"Drives"},{"name":"Domains"},{"name":"Account"}],"paths":{"/auth/request-code":{"post":{"summary":"Email a sign-in code","description":"Ask the person for their email, call this, then ask them to paste the code from their inbox. A new email creates an account.","tags":["Sign in"],"security":[],"parameters":[{"$ref":"#/components/parameters/client"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"}},"required":["email"]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/auth/verify-code":{"post":{"summary":"Exchange the emailed code for an API key","description":"Returns apiKey (shown once) and user. Store the key privately, e.g. ~/.bigangels/credentials; never print it in the chat. Codes expire after 15 minutes; five wrong codes cancel one.","tags":["Sign in"],"security":[],"parameters":[{"$ref":"#/components/parameters/client"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"code":{"type":"string","description":"The code from the email."},"keyName":{"type":"string","description":"Names the key after your tool, e.g. claude-code."}},"required":["email","code"]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/publish":{"post":{"summary":"Create a site and get signed upload URLs","description":"Without auth: an anonymous six-hour preview; the reply includes claimToken and claimUrl (keep them private). The site is not live until finalize.","tags":["Publish"],"security":[{"bearer":[]},{}],"parameters":[{"$ref":"#/components/parameters/client"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Relative to the site root, e.g. index.html or assets/app.js."},"size":{"type":"integer","description":"Bytes."},"contentType":{"type":"string","description":"e.g. text/html; charset=utf-8"},"hash":{"type":"string","description":"Optional SHA-256 hex of the file. On updates, files whose hash matches the live version are skipped (upload.skipped) and copied server-side."}},"required":["path","size"]},"minItems":1,"maxItems":500},"spaMode":{"type":"boolean","description":"Serve index.html for unknown paths (client-side routing)."},"crossOriginIsolation":{"type":"boolean","description":"Send COOP/COEP so threaded WebAssembly (SharedArrayBuffer) works."},"displayName":{"type":"string","description":"Owner-facing title, up to 80 characters."},"folder":{"type":"string","description":"Signed-in only: a folder name (created if missing) or id."},"fromDrive":{"type":"object","properties":{"driveId":{"type":"string"},"prefix":{"type":"string"},"version":{"type":"string"},"slug":{"type":"string"}},"required":["driveId"]}},"required":[],"anyOf":[{"required":["files"]},{"required":["fromDrive"]}]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/publish/{slug}":{"parameters":[{"name":"slug","in":"path","required":true,"description":"The site name, e.g. bright-canvas-a7k2.","schema":{"type":"string"}}],"put":{"summary":"Stage an update to a site","description":"Same body as create. Anonymous previews add claimToken. Send each file's hash to skip re-uploading unchanged files.","tags":["Publish"],"security":[{"bearer":[]},{}],"parameters":[{"$ref":"#/components/parameters/client"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"Relative to the site root, e.g. index.html or assets/app.js."},"size":{"type":"integer","description":"Bytes."},"contentType":{"type":"string","description":"e.g. text/html; charset=utf-8"},"hash":{"type":"string","description":"Optional SHA-256 hex of the file. On updates, files whose hash matches the live version are skipped (upload.skipped) and copied server-side."}},"required":["path","size"]},"minItems":1,"maxItems":500},"spaMode":{"type":"boolean","description":"Serve index.html for unknown paths (client-side routing)."},"crossOriginIsolation":{"type":"boolean","description":"Send COOP/COEP so threaded WebAssembly (SharedArrayBuffer) works."},"displayName":{"type":"string","description":"Owner-facing title, up to 80 characters."},"folder":{"type":"string","description":"Signed-in only: a folder name (created if missing) or id."},"fromDrive":{"type":"object","properties":{"driveId":{"type":"string"},"prefix":{"type":"string"},"version":{"type":"string"},"slug":{"type":"string"}},"required":["driveId"]},"claimToken":{"type":"string"}},"required":["files"]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/publish/{slug}/uploads/refresh":{"parameters":[{"name":"slug","in":"path","required":true,"description":"The site name, e.g. bright-canvas-a7k2.","schema":{"type":"string"}}],"post":{"summary":"Re-sign upload URLs for a pending version","tags":["Publish"],"security":[{"bearer":[]},{}],"parameters":[{"$ref":"#/components/parameters/client"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"versionId":{"type":"string"},"claimToken":{"type":"string"}},"required":["versionId"]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/publish/{slug}/finalize":{"parameters":[{"name":"slug","in":"path","required":true,"description":"The site name, e.g. bright-canvas-a7k2.","schema":{"type":"string"}}],"post":{"summary":"Make the staged version live","description":"Safe to retry. Show the person siteUrl only after this succeeds.","tags":["Publish"],"security":[{"bearer":[]},{}],"parameters":[{"$ref":"#/components/parameters/client"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"versionId":{"type":"string"},"claimToken":{"type":"string","description":"Anonymous previews only."}},"required":["versionId"]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/claim":{"post":{"summary":"Keep an anonymous preview on your account","tags":["Publish"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"claimToken":{"type":"string"}},"required":["claimToken"]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sites":{"get":{"summary":"List your sites","tags":["Sites"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sites/search":{"get":{"summary":"Search your sites by name, address and text","tags":["Sites"],"security":[{"bearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"description":"Search text.","schema":{"type":"string"}},{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sites/{slug}":{"parameters":[{"name":"slug","in":"path","required":true,"description":"The site name, e.g. bright-canvas-a7k2.","schema":{"type":"string"}}],"get":{"summary":"A site's details, versions and files","tags":["Sites"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Change a site's settings","tags":["Sites"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"type":"string"},"spaMode":{"type":"boolean"},"crossOriginIsolation":{"type":"boolean"},"password":{"type":["string","null"],"description":"Set, change, or null to remove."},"folder":{"type":["string","null"]}},"required":[]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a site","tags":["Sites"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sites/{slug}/files":{"parameters":[{"name":"slug","in":"path","required":true,"description":"The site name, e.g. bright-canvas-a7k2.","schema":{"type":"string"}}],"get":{"summary":"List the live version's files","description":"Each file has path, size, contentType, hash and a url to GET its bytes. Owners send their API key; anonymous previews send the claim token in the X-Claim-Token header. Also at /publish/{slug}/files.","tags":["Files"],"security":[{"bearer":[]},{"claimToken":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sites/{slug}/files/{path}":{"parameters":[{"name":"slug","in":"path","required":true,"description":"The site name, e.g. bright-canvas-a7k2.","schema":{"type":"string"}},{"name":"path","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Read one live file","description":"Returns the stored bytes with Content-Type, an ETag of the file's SHA-256 and X-BigAngels-Version. HEAD returns only the headers. Works on password-protected and invite-only sites for the owner.","tags":["Files"],"security":[{"bearer":[]},{"claimToken":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"*/*":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"head":{"summary":"Read a live file's headers","tags":["Files"],"security":[{"bearer":[]},{"claimToken":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sites/{slug}/versions":{"parameters":[{"name":"slug","in":"path","required":true,"description":"The site name, e.g. bright-canvas-a7k2.","schema":{"type":"string"}}],"get":{"summary":"List versions, newest first","tags":["Versions"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sites/{slug}/versions/{versionId}/restore":{"parameters":[{"name":"slug","in":"path","required":true,"description":"The site name, e.g. bright-canvas-a7k2.","schema":{"type":"string"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Make an older version live again","tags":["Versions"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sites/{slug}/versions/{versionId}/preview":{"parameters":[{"name":"slug","in":"path","required":true,"description":"The site name, e.g. bright-canvas-a7k2.","schema":{"type":"string"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Get a private preview link for a version","tags":["Versions"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sites/{slug}/versions/{versionId}":{"parameters":[{"name":"slug","in":"path","required":true,"description":"The site name, e.g. bright-canvas-a7k2.","schema":{"type":"string"}},{"name":"versionId","in":"path","required":true,"schema":{"type":"string"}}],"delete":{"summary":"Delete an old version for good","tags":["Versions"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sites/{slug}/duplicate":{"parameters":[{"name":"slug","in":"path","required":true,"description":"The site name, e.g. bright-canvas-a7k2.","schema":{"type":"string"}}],"post":{"summary":"Copy a site to a new address","tags":["Versions"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sites/{slug}/access":{"parameters":[{"name":"slug","in":"path","required":true,"description":"The site name, e.g. bright-canvas-a7k2.","schema":{"type":"string"}}],"get":{"summary":"Who can view the site","tags":["Access"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Change who can view the site","description":"mode: anyone_with_link or restricted (specific emails and domains; both empty means only you). Passwords are set with PATCH /sites/{slug}.","tags":["Access"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string"},"allowedEmails":{"type":"array","items":{"type":"string"}},"allowedDomains":{"type":"array","items":{"type":"string"}},"notify":{"type":"boolean","description":"Email newly added people. Ask the owner first."}},"required":[]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sites/{slug}/access/invites":{"parameters":[{"name":"slug","in":"path","required":true,"description":"The site name, e.g. bright-canvas-a7k2.","schema":{"type":"string"}}],"post":{"summary":"Re-send invite emails","tags":["Access"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"emails":{"type":"array","items":{"type":"string"}}},"required":["emails"]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sites/{slug}/data":{"parameters":[{"name":"slug","in":"path","required":true,"description":"The site name, e.g. bright-canvas-a7k2.","schema":{"type":"string"}}],"get":{"summary":"A site's collections and record counts","tags":["Site Data"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sites/{slug}/data/{collection}":{"parameters":[{"name":"slug","in":"path","required":true,"description":"The site name, e.g. bright-canvas-a7k2.","schema":{"type":"string"}},{"name":"collection","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List records, newest first","tags":["Site Data"],"security":[{"bearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"Page size.","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"nextCursor from the last page.","schema":{"type":"string"}},{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Add a record","tags":["Site Data"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sites/{slug}/data/{collection}/export.csv":{"parameters":[{"name":"slug","in":"path","required":true,"description":"The site name, e.g. bright-canvas-a7k2.","schema":{"type":"string"}},{"name":"collection","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Download a collection as CSV","tags":["Site Data"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"text/csv":{"schema":{"type":"string"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sites/{slug}/data/{collection}/{id}":{"parameters":[{"name":"slug","in":"path","required":true,"description":"The site name, e.g. bright-canvas-a7k2.","schema":{"type":"string"}},{"name":"collection","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Read a record","tags":["Site Data"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Change a record","tags":["Site Data"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a record","tags":["Site Data"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me/variables":{"get":{"summary":"List variable names (never values)","tags":["Variables & proxy"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me/variables/{name}":{"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"put":{"summary":"Create or replace a variable","tags":["Variables & proxy"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"string"},"allowedUpstreams":{"type":"array","items":{"type":"string","description":"Hostname the value may be sent to."}}},"required":["value"]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a variable","tags":["Variables & proxy"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/sites/{slug}/proxy":{"parameters":[{"name":"slug","in":"path","required":true,"description":"The site name, e.g. bright-canvas-a7k2.","schema":{"type":"string"}}],"get":{"summary":"A site's proxy routes and any problems","tags":["Variables & proxy"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/folders":{"get":{"summary":"List folders","tags":["Organise"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a folder","tags":["Organise"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/folders/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"patch":{"summary":"Rename a folder","tags":["Organise"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a folder (its sites move out)","tags":["Organise"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/profile":{"get":{"summary":"Your public profile settings","tags":["Organise"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Change your profile","tags":["Organise"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"bio":{"type":"string"},"link":{"type":"string"},"username":{"type":"string"}},"required":[]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/profile/sites":{"get":{"summary":"Sites on your profile","tags":["Organise"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Show a site on your profile","tags":["Organise"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"summary":"Set which sites show, in order","tags":["Organise"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slugs":{"type":"array","items":{"type":"string"}}},"required":["slugs"]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/profile/sites/{slug}":{"parameters":[{"name":"slug","in":"path","required":true,"description":"The site name, e.g. bright-canvas-a7k2.","schema":{"type":"string"}}],"delete":{"summary":"Take a site off your profile","tags":["Organise"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/usernames/check":{"get":{"summary":"Is a username free","tags":["Organise"],"security":[{"bearer":[]}],"parameters":[{"name":"name","in":"query","required":true,"description":"The username.","schema":{"type":"string"}},{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/drives":{"get":{"summary":"List your Drives","tags":["Drives"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a Drive","tags":["Drives"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}},"required":["name"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/drives/{driveId}/files":{"parameters":[{"name":"driveId","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List files","tags":["Drives"],"security":[{"bearer":[]}],"parameters":[{"name":"prefix","in":"query","required":false,"description":"Folder, e.g. notes/.","schema":{"type":"string"}},{"name":"delimiter","in":"query","required":false,"description":"/ for one level.","schema":{"type":"string"}},{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/drives/{driveId}/files/{path}":{"parameters":[{"name":"driveId","in":"path","required":true,"schema":{"type":"string"}},{"name":"path","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Read a file","tags":["Drives"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"*/*":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"summary":"Write a small file in one call","tags":["Drives"],"security":[{"bearer":[]}],"parameters":[{"name":"If-Match","in":"header","required":false,"description":"The existing file's ETag when replacing it.","schema":{"type":"string"}},{"name":"If-None-Match","in":"header","required":false,"description":"Use * to create only when the path is free.","schema":{"type":"string"}},{"$ref":"#/components/parameters/client"}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a file (If-Match: the file's ETag)","tags":["Drives"],"security":[{"bearer":[]}],"parameters":[{"name":"If-Match","in":"header","required":true,"description":"The file's current ETag.","schema":{"type":"string"}},{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/drives/{driveId}/files/uploads":{"parameters":[{"name":"driveId","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Stage a large file and get an upload URL","tags":["Drives"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/drives/{driveId}/files/finalize":{"parameters":[{"name":"driveId","in":"path","required":true,"schema":{"type":"string"}}],"post":{"summary":"Commit a staged file","tags":["Drives"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"uploadId":{"type":"string"}},"required":["uploadId"]}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/drives/{driveId}/tokens":{"parameters":[{"name":"driveId","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"List share tokens","tags":["Drives"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Share a Drive with a scoped token","tags":["Drives"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"perms":{"type":"string","description":"read or write"},"pathPrefix":{"type":"string"},"ttl":{"type":"string","description":"e.g. 7d"},"label":{"type":"string"},"manageTokens":{"type":"boolean","description":"May mint narrower tokens."}},"required":[]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/registrar/search":{"get":{"summary":"Suggest domains with prices","tags":["Domains"],"security":[{"bearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"description":"Words or a name.","schema":{"type":"string"}},{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/registrar/check/{domain}":{"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Exact availability and price","tags":["Domains"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/registrar/purchase":{"post":{"summary":"Buy a domain (confirm the price with the person first)","tags":["Domains"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string"},"years":{"type":"integer"},"acknowledgedPriceCents":{"type":"integer","description":"The price from /registrar/check, echoed back to confirm it."},"autoRenew":{"type":"boolean"}},"required":["domain"]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/registrar/domains":{"get":{"summary":"Domains you bought","tags":["Domains"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me":{"get":{"summary":"Who you are, plan and usage","tags":["Account"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me/keys":{"get":{"summary":"List API keys","tags":["Account"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a named API key","tags":["Account"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":[]}}}},"responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me/keys/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"delete":{"summary":"Revoke a key","tags":["Account"],"security":[{"bearer":[]}],"parameters":[{"$ref":"#/components/parameters/client"}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object"}}}},"default":{"description":"Error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}