Roll back to a deployment
POST
Deploys that deployment's image again, with the service's settings of today. It replaces what runs now.
This loses data or replaces what runs; MCP asks for confirmation first.
bearerheader
AuthorizationBearer <token>An API key (opk_…) or a CLI token (opc_…).
deploymentId*stringThe deployment's id.
Idempotency-Key?stringAny unique string up to 255 characters. Sending the same request again with it returns the first answer instead of creating twice.
Length
length <= 255Roll back to a deployment
application/json- response
id*stringFormat
uuidserviceId*stringFormat
uuidprojectId*stringFormat
uuidstatus*stringValue in
"queued""building""deploying""running""failed""superseded""cancelled"commit*string|nullimage*string|nullconfig*The service's settings when this deployment was made, and where each replica runs.
rollbackOf*|nullerror*string|nullcreatedBy*string|nullcreatedAt*stringFormat
date-timefinishedAt*|nullcurl -X POST "https://openpanel.sh/api/v1/deployments/$DEPLOYMENT_ID/rollback" \ -H "Authorization: Bearer $OPENPANEL_TOKEN"Example response
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "serviceId": "8f8bb40f-b96b-40fe-9064-5031fbe483f9", "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8", "status": "queued", "commit": "string", "image": "string", "config": { "property1": null, "property2": null }, "rollbackOf": "65f4f6e9-31b7-43b4-9674-5c6963c953c2", "error": "string", "createdBy": "string", "createdAt": "2019-08-24T14:15:22Z", "finishedAt": "2019-08-24T14:15:22Z"}