Skip to main content
POST
Restore a site's database to a point in time

Authorizations

Authorization
string
header
required

API key in the format: Bearer {api_token}

Headers

Idempotency-Key
string

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.

Maximum string length: 255

Path Parameters

id
string
required

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

Body

application/json
bookmark
string

A restore point, as returned by db/migrations (restore_to) or by a migration's own response.

timestamp
string

An ISO 8601 timestamp to rewind to (nearest point at or before).

environment
enum<string>
default:production

Which database to use. A site normally has exactly one, production, and that is the default — the live database the site reads. development is only valid if a separate development database has been provisioned for this site; asking for one that doesn't exist is an error rather than a silent fall back to production. The response echoes the environment that was used.

Available options:
development,
production

Response

Restore result

object
string
bookmark
string
previous_bookmark
string
message
string