---
title: "Restore an earlier setup"
method: POST
path: "/v1/environments/{environment_id}/restore"
tags: ["Environments"]
---

# Restore an earlier setup

`POST /v1/environments/{environment_id}/restore`

## Request

- Base URL: `https://api.replicas.dev`
- URL: `https://api.replicas.dev/v1/environments/{environment_id}/restore`
- Auth: HTTP bearer

Puts the environment back to the setup a build made live: its warm hook, repositories, variables, files, and skills, and the image built from them. New workspaces get it right away. If that image was already cleaned up, the restored settings are rebuilt (`rebuilding: true`). Builds keep their setup while they are among the last 10 that stored one (`restorable`).

## Path parameters

- `environment_id` string, required

## Headers

- `X-Replicas-Api-Version` '2026-10-07'

## Request body

- object
  - `build_id` string, uuid, required

## Response `200`

Restored

- object
  - `rebuilding` boolean, required

## Other responses

- `400`: Bad request - Missing or invalid parameters
- `401`: Unauthorized - Invalid or missing API key
- `404`: Resource not found
- `500`: Internal server error

---

[API](https://skmtc.dev/replicas/apis/replicas-api.md) - [All operations](https://skmtc.dev/replicas/apis/replicas-api/llms.txt) - [OpenAPI document](https://skmtc.dev/replicas/apis/replicas-api/revisions/2703ac1c9cb7?raw)
