Plan or confirm a project snapshot restore
Two-step restore. A request without confirm returns restore_plan with data-loss/auth/release details and a short-lived confirm token. A request with confirm materializes the snapshot into a spare slot, captures a pre_restore undo snapshot, atomically flips the project slot, optionally restores auth identities when include:["auth"], and returns next actions. Also accepts the project's own service key (serviceKey), scoped to that project: a key for another project is refused 403 for every id, and a service key plus a SIWX header is refused 400 AUTH_CREDENTIALS_AMBIGUOUS. release and include must match between plan and confirm. A service key restores app data only: include:["auth"] is refused 403 SNAPSHOT_AUTH_RESTORE_REQUIRES_PRINCIPAL. wait:false answers 202 with a handle to poll.
Request
- Base URL: https://api.run402.com
- URL: https://api.run402.com/projects/v1/{project_id}/snapshots/{snapshot_id}/restore
- Auth: one of:
- API key in header SIGN-IN-WITH-X
- HTTP bearer
- HTTP bearer
Path parameters
Run402 project ID. Public IDs are not UUIDs.
Request body
Response
Restore plan or confirmed restore result.
Example response
{
"restore_plan": {
"project_id": "prj_1741340000_0042",
"next_actions": [
{
"method": "POST",
"path": "/tiers/v1/hobby",
"auth": "x402"
}
]
}
}Changes
No recorded changes to this operation across all 1 revision of this API.