Activate (Promote / Roll back / Restart)
Make a built deploy the live one (the app's current_deploy_uuid). This one call covers three moves — there is no separate promote endpoint:
- Promote to production — activate a newer built-but-not-live candidate (one deployed with
activate=false) once you've reviewed its preview. - Roll back — activate an older built version to return production to it.
- Restart / roll out — activate the current version to re-ship it (managed backends re-roll the running pod; useful to pick up new env vars).
Works on any deploy the deploy list marks rollbackable — a terminal, non-pruned version that isn't already the live one. A newer candidate reads as “Promote to production” in the dashboard, an older one as “Roll back to this version”; both are this same request. The build worker auto-activates the first successful deploy (unless it was built as a candidate), so you call this to switch versions afterward.
Only a deploy that has already been built can be activated — its status must be ready, superseded, or (managed apps) image_ready. A queued / processing / building / failed deploy is rejected with 409.
What happens depends on the app type
- Static apps — the edge serves the current deploy's built bundle directly, so activation (promote, roll back, or roll out) is an atomic pointer flip (plus an edge pre-warm). No rebuild, no downtime. The response returns
{ "status": "ok", "current_deploy_uuid": … }and the previously-live deploy is markedsuperseded. - Managed / fullstack apps — the running pod is whatever the runtime last reconciled, so activation re-enqueues the deploy as
image_ready. The worker re-points the Deployment at that deploy's already scanned + signed, digest-pinned image, re-materializes env vars, and advances the live version only on a proven-ready rollout. The response returns{ "status": "rolling_out", "deploy_uuid": … }. Rollback is instant because the image is immutable and digest-pinned.
deploy_max_rollback_versions). Once a deploy's build artifact is pruned (its static bundle or OCI image is deleted), activating it returns 409 — re-deploy from source instead. Check the rollbackable / pruned fields on the deploy list before offering a rollback.
Response (200 OK)
ok (static) or rolling_out (managed / fullstack).Deprecated: until the sunset this response also carries the legacy integer current_deploy_id / deploy_id field. Don't use it; read the *_uuid field.