Skip to main content
POST
Typescript (SDK)

Authorizations

Authorization
string
header
required

API key in the format: Bearer {api_token}

Path Parameters

id
string
required

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

Body

application/json
deployment_id
string

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_database
boolean
default:false

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

id
string
required
object
string
required
status
enum<string>
required
Available options:
pending,
building,
live,
failed,
superseded,
unpublished
commit_sha
string | null
required
is_live
boolean
required
url
string | null
required
triggered_by
string | null
required
error_message
string | null
required
db_bookmark
string | null
required
duration_seconds
number | null
required
started_at
string | null
required
finished_at
string | null
required
created_at
string
required