# Rollback Site to Earlier Deploy

> Rollback Site to Earlier Deploy is a paid API for AI agents from agents.withzero.xyz, paid per call via MPP, price unknown, status unknown (last checked 2026-10-14).

Restores a previously superseded deploy of a hosted static site, reverting its files and routing rules while preserving current visibility, password, and SPA settings.

## Facts

- Endpoint: POST https://agents.withzero.xyz/api/v1/cdn/sites/{slug}/rollback?utm_source=zero.xyz
- Price: price unknown
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-14
- Activations on Zero: 0
- Provider: agents.withzero.xyz
- Website: https://agents.withzero.xyz
- Canonical page: https://www.zero.xyz/c/agents-withzero-xyz-rollback-site-to-earlier-deploy-ee163f04
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4TecE0TEbEtS1GOIgtpJa

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agents-withzero-xyz-rollback-site-to-earlier-deploy-ee163f04 -d '<json body>'
```

Example prompt: Roll back my hosted site 'marketing-homepage' to deploy d9f3a2b1 — that was the last stable version before today's broken release.

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

Restore an earlier deploy of a site you host. Its files and rules come back; visibility, password and spa stay as they are now.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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
}
```

## Response schema (JSON Schema)

```json
{
 "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
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agents-withzero-xyz-rollback-site-to-earlier-deploy-ee163f04/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.withzero.xyz](https://www.zero.xyz/host/agents.withzero.xyz/llms.txt)
