---
title: "Restore warm pool snapshot"
method: POST
path: "/v1/environments/{environment_id}/warm-pool-snapshots/{snapshot_id}/restore"
tags: ["Warm pools"]
---

# Restore warm pool snapshot

`POST /v1/environments/{environment_id}/warm-pool-snapshots/{snapshot_id}/restore`

## Request

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

Rebuilds the warm pool from an earlier snapshot without rerunning the warm hook. The current pool serves until the new one is ready.

## Path parameters

- `environment_id` string, required
- `snapshot_id` string, uuid, required

## Headers

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

## Response `200`

Snapshot restore started

- RestoreWarmPoolSnapshotResponse
  - `warm_pool` WarmPoolConfigWithStats, required: Warm pool configuration plus current pool counts.
    - `id` string, uuid, required
    - `organization_id` string, uuid, required
    - `environment_id` string, uuid, required
    - `enabled` boolean, required
    - `target_size` integer, required: Target number of pre-warmed workspaces, sized from the environment's recent demand
    - `generation` integer, required: Monotonic counter bumped on every invalidation. Workspaces and snapshots carry the generation they were built for; anything older is stale by derivation.
    - `error_count` integer, required: Consecutive reconcile failures since the last success. Resets to 0 on success; drives exponential backoff via `next_retry_at`.
    - `next_retry_at` string, date-time, nullable, required: Earliest time the next reconcile pass may run for this config. Null when not in backoff.
    - `last_error_at` string, date-time, nullable, required: When the most recent reconcile error was recorded (null if no current error).
    - `last_error_message` string, nullable, required: Most recent reconcile error message (null if no current error).
    - `has_base_snapshot` boolean, required: Whether the current generation has a base snapshot.
    - `updated_at` string, date-time, required
    - `ready_count` integer, required: Number of pre-warmed workspaces at the current generation that are ready to be assigned
    - `stale_count` integer, required: Number of ready workspaces at older generations. Still claimable as a fallback; trimmed by reconcile when over target.
    - `warming_count` integer, required: Number of workspaces at the current generation that are currently warming (warm hooks running)
    - `snapshotting_count` integer, required: Number of seed workspaces currently capturing a base snapshot (E2B only). Always 0 on providers without live snapshots.
    - `last_failure_at` string, date-time, nullable, required: When the most recent warm-up failure occurred (null if never)
    - `last_failure_reason` string, nullable, required: Reason for the most recent warm-up failure
  - `restored_generation` integer, required: Generation of the snapshot that was restored and is now installed

## Other responses

- `400`: Bad request - Missing or invalid parameters
- `401`: Unauthorized - Invalid or missing API key
- `404`: Resource not found
- `409`: Conflict - Resource already exists or operation conflicts with current state
- `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)
