{"uid":"cap_C4Ycvuglj6ZiK31VO6PlT","slug":"x402-hosting-project-rollback-e4fd80d1","name":"x402-hosting Project Rollback","description":"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.","url":"https://api.x402-hosting.com/v1/projects/%7Bid%7D/rollback","method":"POST","headers":{},"bodySchema":{"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},"responseSchema":{"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"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","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":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_axTRZ13wAfQFwzKBvz3Y9","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Initiates a rollback of a hosted Next.js project to a specified previous deployment, returning an async operation ID to track progress.","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Recovering from a broken production deploy","prompt":"The deployment I just pushed is throwing 500 errors on every page — please roll back my x402-hosting project 3fa85f64-5717-4562-b3fc-2c963f66afa6 to the last stable deployment 1a2b3c4d-1a2b-4000-8000-1a2b3c4d5e6f."},{"title":"Reverting a feature release gone wrong","prompt":"We shipped a bad feature flag that's breaking checkout — revert project b7e2d1c0-aaaa-4000-8000-deadbeef0001 on x402-hosting back to deployment f47ac10b-58cc-4372-a567-0e02b2c3d479 right away."},{"title":"Automated rollback after failed health check","prompt":"My monitoring just flagged the new release as unhealthy — automatically roll back project 00000000-0000-4000-8000-000000000002 to the previous good deployment 00000000-0000-4000-8000-000000000003 on x402-hosting."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-10T12:30:01.614Z","isFirstParty":false}