> ## Documentation Index
> Fetch the complete documentation index at: https://docs.replicas.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Restore warm pool snapshot

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



## OpenAPI

````yaml /openapi.json post /v1/environments/{environment_id}/warm-pool-snapshots/{snapshot_id}/restore
openapi: 3.1.0
info:
  title: Replicas API
  version: 2.0.0
  description: >-
    Create and control workspaces, and manage the environments, automations, and
    learnings they run with.
servers:
  - url: https://api.replicas.dev
    description: Production API
security:
  - apiKey: []
tags:
  - name: Replica
    description: >-
      A replica is a Replicas workspace: a cloud sandbox where a coding agent
      works on your repositories.
  - name: Chats
    description: Manage the agent chats inside a replica.
  - name: Message queue
    description: Messages waiting for the agent to finish its turn.
  - name: Commands and terminals
    description: Run commands and open shells in a replica.
  - name: Pull requests
    description: Inspect and act on pull requests a replica opened.
  - name: Previews
    description: Public URLs for ports in a replica.
  - name: Canvas
    description: Plans, reports, and other files agents produce.
  - name: Sharing
    description: Add replicas to members' Shared view.
  - name: Environments
    description: >-
      Environments define what a workspace starts with. The `global` environment
      applies to every workspace.
  - name: Environment variables
    description: Variables injected into workspaces.
  - name: Environment files
    description: Files written into workspaces.
  - name: Environment skills
    description: Agent skills installed into workspaces.
  - name: Environment MCPs
    description: MCP servers available to workspace agents.
  - name: Hooks
    description: Scripts that run when warm pool snapshots build and when workspaces start.
  - name: Warm pools
    description: Pre-built workspaces that start faster.
  - name: Automations
    description: Run agents on schedules and events.
  - name: Repositories
    description: Repositories and repository sets connected to the organization.
  - name: Learnings
    description: Organization skills every workspace agent loads.
  - name: Agent credentials
    description: >-
      API keys and endpoints that coding agents use. Connect Claude, Codex, and
      Muse subscriptions with the CLI.
  - name: Plugins
    description: Connect integrations that workspace agents can use.
  - name: Organization
    description: Who you are and who is in your organization.
  - name: Media
    description: Screenshots, recordings, and other files workspaces produce.
  - name: Slack
    description: Route Slack threads to workspaces.
  - name: Workspace identity
    description: OIDC keys for verifying workspace identity tokens.
paths:
  /v1/environments/{environment_id}/warm-pool-snapshots/{snapshot_id}/restore:
    post:
      tags:
        - Warm pools
      summary: Restore warm pool snapshot
      description: >-
        Rebuilds the warm pool from an earlier snapshot without rerunning the
        warm hook. The current pool serves until the new one is ready.
      operationId: restoreEnvironmentWarmPoolSnapshot
      parameters:
        - name: environment_id
          in: path
          required: true
          description: Environment UUID, or the literal string `global`.
          schema:
            type: string
        - name: snapshot_id
          in: path
          required: true
          description: >-
            Snapshot record UUID from the `snapshots` array returned by GET
            `/v1/environments/{environmentId}/warm-hooks`.
          schema:
            type: string
            format: uuid
        - $ref: '#/components/parameters/ApiVersion'
      responses:
        '200':
          description: Snapshot restore started
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestoreWarmPoolSnapshotResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    ApiVersion:
      name: X-Replicas-Api-Version
      in: header
      description: >-
        API version. `2026-10-07` returns `snake_case` responses. See
        [versioning](/features/api#versioning).
      required: false
      schema:
        type: string
        enum:
          - '2026-10-07'
  schemas:
    RestoreWarmPoolSnapshotResponse:
      type: object
      properties:
        warm_pool:
          $ref: '#/components/schemas/WarmPoolConfigWithStats'
        restored_generation:
          type: integer
          description: Generation of the snapshot that was restored and is now installed
      required:
        - warm_pool
        - restored_generation
    WarmPoolConfigWithStats:
      type: object
      description: Warm pool configuration plus current pool counts.
      properties:
        id:
          type: string
          format: uuid
        organization_id:
          type: string
          format: uuid
        environment_id:
          type: string
          format: uuid
        enabled:
          type: boolean
        target_size:
          type: integer
          description: Target number of pre-warmed workspaces (platform-controlled)
        generation:
          type: integer
          description: >-
            Monotonic counter bumped on every invalidation. Workspaces and
            snapshots carry the generation they were built for; anything older
            is stale by derivation.
        error_count:
          type: integer
          description: >-
            Consecutive reconcile failures since the last success. Resets to 0
            on success; drives exponential backoff via `next_retry_at`.
        next_retry_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Earliest time the next reconcile pass may run for this config. Null
            when not in backoff.
        last_error_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            When the most recent reconcile error was recorded (null if no
            current error).
        last_error_message:
          type:
            - string
            - 'null'
          description: Most recent reconcile error message (null if no current error).
        has_base_snapshot:
          type: boolean
          description: Whether the current generation has a base snapshot.
        updated_at:
          type: string
          format: date-time
        ready_count:
          type: integer
          description: >-
            Number of pre-warmed workspaces at the current generation that are
            ready to be assigned
        stale_count:
          type: integer
          description: >-
            Number of ready workspaces at older generations. Still claimable as
            a fallback; trimmed by reconcile when over target.
        warming_count:
          type: integer
          description: >-
            Number of workspaces at the current generation that are currently
            warming (warm hooks running)
        snapshotting_count:
          type: integer
          description: >-
            Number of seed workspaces currently capturing a base snapshot (E2B
            only). Always 0 on providers without live snapshots.
        last_failure_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the most recent warm-up failure occurred (null if never)
        last_failure_reason:
          type:
            - string
            - 'null'
          description: Reason for the most recent warm-up failure
      required:
        - id
        - organization_id
        - environment_id
        - enabled
        - target_size
        - generation
        - error_count
        - next_retry_at
        - last_error_at
        - last_error_message
        - has_base_snapshot
        - updated_at
        - ready_count
        - stale_count
        - warming_count
        - snapshotting_count
        - last_failure_at
        - last_failure_reason
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
        details:
          type:
            - string
            - 'null'
          description: Additional error details
        code:
          type: string
          description: Machine-readable error code when available
      required:
        - error
  responses:
    BadRequest:
      description: Bad request - Missing or invalid parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Unauthorized - Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Conflict:
      description: >-
        Conflict - Resource already exists or operation conflicts with current
        state
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: Organization or personal API key from **Settings → API Keys**.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.