Roll back to a previous deployment
Re-deploy a previous version by copying its source, dependencies, and runtime pin onto the function's draft, then deploying. Returns immediately with a deployment ID — poll GET /v1/functions/deployments/{deploymentId} until status is active or failed. Secrets are not rolled back.
Authorization
AuthorizationheaderrequiredBearer YOUR_API_KEY. Create a key in the dashboard.
Path parameters
functionIdstringrequiredZavu Function ID.
Body
application/json
deploymentIdstringrequiredID of the deployment to roll back to.
Responses
202Rollback deployment queued.
deploymentobjectrequired10 properties
idstringrequiredfunctionIdstringrequiredversionintegerrequiredMonotonically increasing deployment version, starting at 1.
statusstringrequiredStage of a function deployment.
One ofpendingbundlinguploadingpublishingactivefailedsupersededsourceCodeBytesintegerTotal size of the deployed source tree in bytes.
bundleBytesintegerSize of the built bundle in bytes. Null until the build finishes.
errorMessagestringFailure reason when status is 'failed'.
buildLogsstringWhat the build printed: dependency installation, the bundler's output, and the compiler's message when it failed. Returned when fetching a single deployment, omitted from the list. Read this first when a deploy fails —
errorMessageis often the outer wrapper's summary, and the line that names the broken import or the syntax error is here.deployedAtstring<date-time>createdAtstring<date-time>required
rolledBackToVersionintegerpreviousDraftobjectThe draft that was replaced, so a UI can offer to restore it.
400Invalid request or function in a non-deployable state.
codestringrequiredmessagestringrequireddetailsobject
401Unauthorized.
codestringrequiredmessagestringrequireddetailsobject
404Function or deployment not found.
codestringrequiredmessagestringrequireddetailsobject