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

# Restart Sandbox

> Restart a terminated sandbox under its original ID and name.

Restart a terminated sandbox. The sandbox keeps its original ID and name.

* This path accepts either the sandbox ID or the sandbox name.
* Only terminated sandboxes can be restarted. Anything else returns `400 Bad Request`; to wake a suspended sandbox, use [Resume](/api-reference/v2/sandboxes/resume) instead.
* Terminated sandboxes stay restartable for 48 hours after termination.
* When the sandbox has a usable snapshot, the restart restores from the most recent one. When no snapshot exists, the sandbox cold boots from its image with a fresh filesystem.
* Tensorlake returns `202 Accepted` when restart starts; the sandbox re-enters `Pending` and boots like a newly created sandbox.
* Tensorlake returns `409 Conflict` when a new sandbox has claimed the name since termination, or when the snapshot the restart would restore from is being deleted.


## OpenAPI

````yaml post /sandboxes/{sandbox_id}/restart
openapi: 3.1.0
info:
  title: Tensorlake API
  description: >-
    Tensorlake Cloud APIs for Sandboxes, Document Ingestion, and Serverless
    Workflows
  license:
    name: ''
  version: 0.1.0
servers:
  - url: https://api.tensorlake.ai/
security:
  - bearerAuth: []
tags:
  - name: Tensorlake Cloud API
    description: >-
      Tensorlake Cloud APIs for Sandboxes, Document Ingestion, and Serverless
      Workflows
paths:
  /sandboxes/{sandbox_id}/restart:
    parameters:
      - name: sandbox_id
        in: path
        description: The sandbox ID or sandbox name.
        required: true
        schema:
          type: string
    post:
      tags:
        - sandboxes
      summary: Restart a sandbox
      description: >-
        Restart a terminated sandbox under its original ID and name. The sandbox
        restores from its most recent usable snapshot when one exists, and cold
        boots from its image otherwise. Terminated sandboxes stay restartable
        for 48 hours after termination. Returns `202 Accepted` when restart
        begins.
      operationId: restart_sandbox
      responses:
        '202':
          description: Restart initiated
        '400':
          description: Sandbox is not terminated, or the namespace is at capacity
          content:
            text/plain: {}
        '401':
          description: Unauthorized. Invalid or missing credentials
        '403':
          description: Forbidden. You do not have permission to access this resource
        '404':
          description: Sandbox not found
          content:
            text/plain: {}
        '409':
          description: >-
            Conflict. A new sandbox has claimed this name since termination, or
            the restore snapshot is being deleted
          content:
            text/plain: {}
        '500':
          description: Internal server error
          content:
            text/plain: {}
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````