# x402-hosting Project Rollback

> x402-hosting Project Rollback is a paid API for AI agents from api.x402-hosting.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-10).

Initiates a rollback of a hosted Next.js project to a specified previous deployment, returning an async operation ID to track progress.

## Facts

- Endpoint: POST https://api.x402-hosting.com/v1/projects/%7Bid%7D/rollback
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-hosting-project-rollback-e4fd80d1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_C4Ycvuglj6ZiK31VO6PlT

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 x402-hosting-project-rollback-e4fd80d1 -d '<json body>'
```

Example prompt: My latest deployment broke the site — roll back my x402-hosting project (ID 3fa85f64-5717-4562-b3fc-2c963f66afa6) to deployment 7c9e6679-7425-40de-944b-e07fc1f90ae7.

## When to prefer this

Use this endpoint when a deployed Next.js project on x402-hosting needs to be reverted to a known-good prior deployment — especially in automated CI/CD pipelines, agent-driven incident response, or when a bad release is detected. Prefer this over redeploying from scratch when speed of recovery is critical and a prior deployment artifact already exists on the platform.

## Known failure modes

- Invalid project UUID returns 400 or 404
- Invalid or non-existent deployment UUID returns 404
- Duplicate idempotency key with different params returns 409 conflict
- Payment not provided or insufficient USDC results in 402 Payment Required
- Project not found or unauthorized access returns 403/404
- Rollback to an incompatible or deleted deployment may return 422

## How this service works

Prepaid full-stack Next.js hosting operated by agents. One CLI command builds and deploys your app to a production URL; pay per project-day in USDC over the x402 protocol. No account, no dashboard.

## Output

Returns a JSON object containing the project ID, a new operation ID, an operation URL for polling the rollback status, and the initial state (e.g. 'CREATED'). The agent should poll the operationUrl to track completion.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input",
  "output"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "required": [
      "Idempotency-Key"
     ],
     "properties": {
      "Idempotency-Key": {
       "type": "string",
       "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
      }
     },
     "additionalProperties": true
    },
    "pathParams": {
     "type": "object",
     "required": [
      "id"
     ],
     "properties": {
      "id": {
       "type": "string",
       "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
      }
     },
     "additionalProperties": false
    },
    "queryParams": {
     "type": "object",
     "required": [
      "deploymentId"
     ],
     "properties": {
      "deploymentId": {
       "type": "string",
       "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "type": "object",
     "required": [
      "projectId",
      "operationId"
     ],
     "properties": {
      "state": {
       "type": "string"
      },
      "projectId": {
       "type": "string",
       "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
      },
      "operationId": {
       "type": "string",
       "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
      },
      "operationUrl": {
       "type": "string"
      }
     },
     "additionalProperties": true
    }
   },
   "additionalProperties": false
  }
 },
 "additionalProperties": false
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "state": "CREATED",
  "projectId": "00000000-0000-4000-8000-000000000001",
  "operationId": "00000000-0000-4000-8000-000000000001",
  "operationUrl": "/v1/operations/00000000-0000-4000-8000-000000000001"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-hosting-project-rollback-e4fd80d1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x402-hosting.com](https://www.zero.xyz/host/api.x402-hosting.com/llms.txt)
