{"uid":"cap_mE8DB7PHzGDng6wRIwRRS","slug":"x402-hosting-rollback-project-to-previous-deployment-ab7fec26","name":"x402 Hosting: Rollback Project to Previous Deployment","description":"Roll a project's live site back to a previous deployment. Call this when the current release is broken; pass the target deploymentId as a query parameter. Only the owner wallet can pay.","url":"https://api.x402-hosting.com/v1/projects/:id/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":null,"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_kKhCphe8nSP9wT5N7rB3R","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":"Rolls back a hosted Next.js project to a specified previous deployment by deploymentId, restoring the live site to that version.","exampleAgentPrompt":"My project site is broken after the latest deploy — roll it back to the previous deployment with ID a3f1c2d4-5678-4abc-89ef-0123456789ab for project b9e2d3f5-1234-4def-90ab-cdef01234567.","exampleUseCases":[{"title":"Emergency rollback after bad deploy","prompt":"Our live site just went down after the new release — roll back project e1a2b3c4-0000-4abc-8def-111122223333 to the last stable deployment f4d5e6f7-aaaa-4bbb-8ccc-ddddeeee0000 immediately."},{"title":"Revert to specific stable version","prompt":"The redesign we shipped yesterday is causing checkout errors — can you revert project 99887766-5544-4332-8211-aabbccddeeff back to the deployment from before, ID 11223344-5566-4778-8990-aabbccddeeff?"},{"title":"Agent-managed deployment recovery","prompt":"After the automated deploy pipeline pushed a broken build to project 00112233-4455-4667-8889-aabbccddeeff, restore it to the last known good deployment c0ffee00-1234-4abc-8def-deadbeef0000."}],"resultDescription":"Returns a JSON object with the projectId, a new operationId tracking the rollback, an operationUrl to poll for status, and an optional state field indicating the rollback operation's current state.","failureModes":["Invalid project UUID returns 404 not found","Invalid or non-existent deploymentId returns 404 or 400 bad request","Non-owner wallet attempting payment is rejected","Payment failure via x402 returns 402 Payment Required","Duplicate idempotency key with different parameters may return 409 Conflict","Deployment already active may return a no-op or error"],"whenToPreferThis":"Use this endpoint when a deployed Next.js project on x402 Hosting has a broken or problematic current release and you need to immediately restore a previous known-good deployment. Prefer this over redeploying from source when you have a specific stable deploymentId to target and need the fastest recovery path. This is the right choice for automated incident-response agents or CI/CD pipelines that detect regressions and need to self-heal.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:37:01.037Z","isFirstParty":false}