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

# Set sandbox timeout

> Set the timeout for the sandbox. The sandbox will expire x seconds from the time of the request. Calling this method multiple times overwrites the TTL, each time using the current timestamp as the starting point to measure the timeout duration.



## OpenAPI

````yaml /openapi-public.yml post /sandboxes/{sandboxID}/timeout
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 {port}-{sandboxID}.e2b.app.
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}/timeout:
    servers:
      - url: https://api.e2b.app
        description: E2B Platform API
    post:
      tags:
        - Sandboxes
      summary: Set sandbox timeout
      description: >-
        Set the timeout for the sandbox. The sandbox will expire x seconds from
        the time of the request. Calling this method multiple times overwrites
        the TTL, each time using the current timestamp as the starting point to
        measure the timeout duration.
      operationId: postSandboxTimeout
      parameters:
        - $ref: '#/components/parameters/sandboxID'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - timeout
              properties:
                timeout:
                  description: >-
                    Timeout in seconds from the current time after which the
                    sandbox should expire
                  type: integer
                  format: int32
                  minimum: 0
      responses:
        '204':
          description: Successfully set the sandbox timeout
        '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
  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'
  schemas:
    Error:
      required:
        - code
        - message
      properties:
        code:
          type: integer
          format: int32
          description: Error code
        message:
          type: string
          description: Error
      type: object
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````