Deployments

Roll back a site

Re-ships an earlier deployment's commit to production. Defaults to the previous shipped deployment (the "undo the bad deploy" case); pass deployment_id to target a specific historical deployment instead. Asynchronous: responds 202 with a new pending deployment whose status moves to live/failed. Poll GET /sites/{id}/deployments to track it.

post/sites/{id}/rollback

Request

  • Base URL: https://api.crevio.co/v1
  • URL: https://api.crevio.co/v1/sites/{id}/rollback
  • Auth: API key in header Authorization

Path parameters

idstring required

The resource ID (e.g., "prod_abc123") or slug (e.g., "my-product")

Headers

Idempotency-Keystring

Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.

Request body

deployment_idstring

Id of a specific deployment to roll back to (e.g. "dpl_abc123"), from the deploy history. Omit to roll back to the previous shipped deployment.

restore_databaseboolean

Also rewind the site's database to the schema that deployment was serving, using the restore point captured before the deploy that followed it. Off by default: rolling code back is cheap, but a database restore discards every row written since the target shipped. Returns no_restore_point when no restore point was recorded after the target.

Response

The queued rollback deployment

idstring required
objectstring required
sitestring required
status'pending' | 'building' | 'live' | 'failed' | 'superseded' | 'unpublished' required
commit_shastring nullable required
is_liveboolean required
urlstring nullable required
triggered_bystring nullable required
error_messagestring nullable required
db_bookmarkstring nullable required
current_stagestring nullable required
duration_secondsnumber nullable required
elapsed_secondsnumber nullable required
started_atstring nullable required
finished_atstring nullable required
created_atstring required

Changes

No recorded changes to this operation across all 2 revisions of this API.