{"uid":"cap_3dVtq9WjkfE0p4jT3JflM","slug":"agents-withzero-xyz-change-site-visibility-withzero-cdn-5cee8e1f","name":"Change Site Visibility (WithZero CDN)","description":"Change who can view a site you host: make it private behind an unguessable share link, rotate that link, or make it public again. URL-encode slashes in a nested slug (my%2Fsite).","url":"https://agents.withzero.xyz/api/v1/cdn/sites/{slug}?utm_source=zero.xyz","method":"PATCH","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"spa":{"type":"boolean","description":"Single-page app routing. true: a missing extensionless path (e.g. /dashboard/settings) serves the site index.html with 200 so a client-side router handles it; missing assets (.js, .png…) still 404. false: misses serve the site 404.html, if it has one, with status 404. Omit to keep the current setting (new sites default to false)."},"password":{"type":"string","maxLength":256,"minLength":8,"description":"Sets or changes the site password (implies visibility:\"password\"). 8–256 chars. Omit to keep the current one."},"rotateLink":{"type":"boolean","const":true,"description":"Issue a new share URL; the old one stops working immediately. Private sites only."},"visibility":{"enum":["public","link","password"],"type":"string","description":"New visibility. \"link\" moves the site to a private /p/<shareId>/ URL; \"password\" puts it behind a password on its own origin, shared as cdn.withzero.xyz/p/<id>/ (a redirect); \"public\" moves it back to /<walletId>/<slug>/. Any change of visibility issues a new shareUrl."}},"additionalProperties":false},"responseSchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["visibility","shareUrl","url","spa"],"properties":{"spa":{"type":"boolean","description":"Whether single-page-app routing is on."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Public URL when visibility is public; null otherwise."},"shareUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Private URL for link/password sites; null when public. Treat as a secret."},"visibility":{"enum":["public","link","password"],"type":"string"}},"additionalProperties":false},"example":null,"exampleRequest":null,"tags":[],"displayCostAmount":"0.000000","displayCostAsset":"USD","priceDynamic":false,"priceHint":null,"priceStatus":"unknown_unparsed","priceSource":"registry","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"unknown","summary":"price unknown","primary":{"kind":"unknown","protocol":"mpp","network":"tempo","amountUsd":null,"per":"call","confidence":"unknown"},"accepted":[{"kind":"unknown","protocol":"mpp","network":"tempo","amountUsd":null,"per":"call","confidence":"unknown"}]},"paymentMethods":[{"uid":"pm_kMhLC6jbZFE161t6QPrJf","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.000000","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":"agents.withzero.xyz","brandSlug":"agents-withzero-xyz-x402","brandBaseUrl":"https://agents.withzero.xyz","brandDocsUrl":null,"whatItDoes":"Updates the visibility of a hosted site to public, private link-only, or password-protected, and optionally rotates the private share link.","exampleAgentPrompt":"Make my hosted site 'portfolio' private so only people with the secret link can view it — I don't want it publicly accessible anymore.","exampleUseCases":[{"title":"Restrict site to private link","prompt":"Change my site 'client-demo' to private so it's only accessible via an unguessable share link — remove it from the public URL."},{"title":"Add password protection to site","prompt":"Put my site 'internal-docs' behind a password — use 'SecurePass2024!' as the password so only people I share it with can get in."},{"title":"Rotate share link after leak","prompt":"Someone shared my private site link without permission — rotate the share URL for my site 'my%2Fproject' immediately so the old link stops working and give me the new one."}],"resultDescription":"Returns the updated visibility mode ('public', 'link', or 'password'), the new public URL (if the site is now public, otherwise null), and the new private share URL (if the site is link- or password-protected, otherwise null).","failureModes":["Invalid slug or site not found returns 404","Password shorter than 8 or longer than 256 characters returns 400 validation error","rotateLink set to true on a public site returns 400 (only valid for private sites)","Unauthorized or expired payment token returns 401 or 402","Slug contains unencoded slashes causing routing errors — must URL-encode as %2F"],"whenToPreferThis":"Use this endpoint when you need to change who can access an already-hosted site on the WithZero CDN — switching between public, link-private, and password-protected modes, or invalidating an existing share link. Prefer this over re-deploying the site from scratch when only access control needs to change.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-21T00:31:41.250Z","isFirstParty":true,"canonicalSlug":"agents-withzero-xyz-change-site-visibility-withzero-cdn-5cee8e1f"}