Preview CI is available only after account activation. Use a namespace-bound
dbhci_ key for these endpoints. A full-account dbh_ key cannot substitute
for a preview CI key. Previews are for synthetic test data; do not put
production or personal data in them.Create or replay
POST /api/v1/previews accepts ref, optional ttlHours (1–72, default 24)
and optional scheduledBackup (none or daily, default none). The server
derives the internal name and idempotency key from the CI namespace and ref.
Repeating the same ref and choices returns the same preview; changing the
choices for that ref conflicts. Creation counts against the existing total
database quota.
Inspect and renew
GET /api/v1/previews/{databaseId} returns the database and namespace IDs,
lease status and generation, expiry, backup choice and, after deletion, the
recovery deadline. The response contains no credentials.
POST /api/v1/previews/{databaseId}/extend accepts
{ "ttlHours": 24 }. The value may be up to 72 hours per renewal. An expired
or deleting lease cannot be renewed. To switch between none and daily, use
PATCH /api/v1/previews/{databaseId}/backup-policy with
{ "scheduledBackup": "daily" }.
Delete and recover
DELETE /api/v1/previews/{databaseId} takes no body. Deletion must finish
with its own verified backup before the seven-day recovery window begins.
Unknown agent outcomes remain held rather than creating a second deletion.
The CI key cannot recover a deleted preview. An owner with a full-account key
uses POST /api/v1/databases/{databaseId}/recover within seven days. A
successful recovery starts a new 24-hour lease; later renewals can again be
up to 72 hours.