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

# Refresh sandbox

> Refresh the sandbox extending its time to live



## OpenAPI

````yaml /openapi-public.yml post /sandboxes/{sandboxID}/refreshes
openapi: 3.1.0
info:
  title: E2B API
  version: 0.1.0
  description: >-
    Complete E2B developer API. Platform endpoints are served on api.e2b.app.
    Sandbox endpoints (envd) are served on the shared sandbox host
    (sandbox.e2b.app); target a specific sandbox with the E2b-Sandbox-Id and
    E2b-Sandbox-Port headers.
servers:
  - url: https://api.e2b.app
    description: E2B Platform API
security: []
tags:
  - name: Sandboxes
  - name: Templates
  - name: Tags
  - name: Volumes
  - name: Envd
  - name: Filesystem
  - name: Process
  - name: Teams
paths:
  /sandboxes/{sandboxID}/refreshes:
    servers:
      - url: https://api.e2b.app
        description: E2B Platform API
    post:
      tags:
        - Sandboxes
      summary: Refresh sandbox
      description: Refresh the sandbox extending its time to live
      operationId: postSandboxRefreshes
      parameters:
        - $ref: '#/components/parameters/sandboxID'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SandboxRefreshRequest'
      responses:
        '204':
          description: Successfully refreshed the sandbox
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
      security:
        - ApiKeyAuth: []
components:
  parameters:
    sandboxID:
      name: sandboxID
      in: path
      required: true
      schema:
        type: string
  schemas:
    SandboxRefreshRequest:
      type: object
      properties:
        duration:
          description: Duration for which the sandbox should be kept alive in seconds
          type: integer
          maximum: 3600
          minimum: 0
    Error:
      required:
        - code
        - message
      properties:
        code:
          type: integer
          format: int32
          description: Error code
        message:
          type: string
          description: Error
      type: object
  responses:
    '401':
      description: Authentication error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '404':
      description: Not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '500':
      description: Server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````