Skip to main content
POST
Authenticate with Authorization: Bearer sk_live_... on https://api.agent37.com.

Path parameters

string
required
The instance id, returned when you create an instance.

Request body

string
required
A backup id from List backups. Restore replaces the current data in place; back up first if you need to keep it.

Behavior and errors

POST /v1/instances/{id}/restore with { "backup": "<id>" } rolls the instance back to that backup, in place: same id, URLs, and public ports. The data is replaced, not merged, so files written after the backup are gone. The container is recreated, so in-memory state is lost; a running instance comes back running, a stopped one stays stopped, and the instance reads updating in between. The operating-system layer comes back as it was at the backup when the instance still runs the same image, and fresh after an update, as update itself leaves it. Restore is destructive and takes no safety copy: back up first if you may want the current state back. backup is the only accepted field; any other returns 400. The instance must be running or stopped: a sleeping one has to be woken first, one parked in cold storage started first, and anything mid-transition or failed returns 400. The call returns when the copy is done, up to 12 minutes. A client timeout does not stop it: the instance stays updating and a second restore returns 400 until the first finishes, so poll GET /v1/instances/{id} instead of retrying. A restore that fails returns 502 provisioning_failed and leaves the instance stopped, or running if it never took the container down, with the reason in status_reason. Every backup is still there, so you can try again. See Backups for retention and what is saved.