{"uid":"cap_4TecE0TEbEtS1GOIgtpJa","slug":"agents-withzero-xyz-rollback-site-to-earlier-deploy-ee163f04","name":"Rollback Site to Earlier Deploy","description":"Restore an earlier deploy of a site you host. Its files and rules come back; visibility, password and spa stay as they are now.","url":"https://agents.withzero.xyz/api/v1/cdn/sites/{slug}/rollback?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["deployId"],"properties":{"deployId":{"type":"string","description":"A deploy from GET /api/v1/sites/{slug}/deploys with status \"superseded\"."}},"additionalProperties":false},"responseSchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["walletId","cacheTtlSeconds","files","deployId"],"properties":{"spa":{"type":"boolean","description":"kind:site only — whether single-page-app routing is on after this upload."},"files":{"type":"array","items":{"type":"object","required":["url","path","sizeBytes"],"properties":{"url":{"type":"string","description":"Public URL this file is served from."},"path":{"type":"string","description":"Path within your wallet namespace (the part after <walletId>/)."},"sizeBytes":{"type":"integer","maximum":9007199254740991,"minimum":-9007199254740991,"description":"Decoded file size in bytes."}},"additionalProperties":false},"description":"One entry per uploaded file. kind:file — a single entry. kind:site — one entry per file in the zip; the hosted site's entry point is /<walletId>/<slug>/, which serves <slug>/index.html."},"deployId":{"type":"string","description":"The new deploy that restored the old one."},"shareUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"kind:site with link or password visibility — the private URL to share. For a link site it is the whole credential; for a password site viewers also need the password."},"walletId":{"type":"string","description":"Random per-wallet base62 id used as the folder in the URL path (the <walletId> in /<walletId>/<slug>/)."},"warnings":{"type":"array","items":{"type":"string"},"description":"kind:site only — rules in _redirects / _headers that were skipped (unsupported syntax, a disallowed header). The deploy itself succeeded."},"visibility":{"enum":["public","link","password"],"type":"string","description":"kind:site only — the site's visibility after this upload."},"cacheTtlSeconds":{"type":"integer","maximum":9007199254740991,"minimum":-9007199254740991,"description":"Resolved edge cache lifetime (Cache-Control max-age) applied to every uploaded object."}},"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_ZUoMr8S7DjwUSL2YlW_rE","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":"Restores a previously superseded deploy of a hosted static site, reverting its files and routing rules while preserving current visibility, password, and SPA settings.","exampleAgentPrompt":"Roll back my hosted site 'marketing-homepage' to deploy d9f3a2b1 — that was the last stable version before today's broken release.","exampleUseCases":[{"title":"Emergency revert after broken release","prompt":"My site 'store-landing' is broken after the last deploy — roll it back to deploy abc123xyz, which was the last working version."},{"title":"Undo accidental content overwrite","prompt":"I accidentally overwrote my blog site 'dev-blog' with the wrong files. Can you restore it to the previous deploy with ID dep_9k2mq7?"},{"title":"Scheduled rollback after failed A/B test","prompt":"The new version of 'promo-site' underperformed — revert it to deploy 5f8e21c0 so we go back to the original landing page."}],"resultDescription":"Returns the new deploy ID that represents the restored state, a full list of files now being served (with their public URLs, paths, and sizes), the wallet ID, edge cache TTL in seconds, any redirect/header rule warnings encountered during restoration, current visibility setting, and the share URL if applicable. The site's visibility, password protection, and SPA routing remain unchanged.","failureModes":["Deploy ID not found or does not belong to the specified site slug — returns 404","Deploy ID refers to a currently live or non-superseded deploy — not eligible for rollback","Invalid or missing slug path parameter — returns 400 or 404","Authentication/payment failure — returns 401 or 402","Site does not exist or has been deleted — returns 404","Warnings array populated if _redirects or _headers rules from the old deploy contain unsupported syntax"],"whenToPreferThis":"Use this endpoint when you need to revert a hosted static site to a specific earlier deploy without changing its current visibility, password, or SPA routing configuration. Prefer this over re-uploading files when you already have a known-good deploy ID from the site's deploy history and want a fast, atomic restoration with no re-upload required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-18T18:40:55.591Z","isFirstParty":true,"canonicalSlug":"agents-withzero-xyz-rollback-site-to-earlier-deploy-ee163f04"}