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

# Pause sandbox

> Pause the sandbox



## OpenAPI

````yaml /openapi-public.yaml post /sandboxes/{sandboxID}/pause
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
  - name: Secrets
  - name: Events
  - name: Webhooks
paths:
  /sandboxes/{sandboxID}/pause:
    servers:
      - url: https://api.e2b.app
        description: E2B Platform API
    post:
      tags:
        - Sandboxes
      summary: Pause sandbox
      description: Pause the sandbox
      operationId: postSandboxPause
      parameters:
        - $ref: '#/components/parameters/sandboxID'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SandboxPauseRequest'
      responses:
        '204':
          description: The sandbox was paused successfully and can be resumed
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                required:
                  - code
                  - message
                properties:
                  code:
                    type: integer
                    format: int32
                    description: Error code
                    example: 400
                  error_code:
                    type: string
                    description: >-
                      Machine-readable semantic error code. Not a closed set;
                      initial values: sandbox_capacity_unavailable,
                      sandbox_placement_timeout, sandbox_no_compatible_node,
                      sandbox_create_failed, internal_server_error.
                  message:
                    type: string
                    description: Error
                type: object
              examples:
                invalidSandboxId:
                  summary: The sandbox ID is malformed
                  value:
                    code: 400
                    message: Invalid sandbox ID
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                required:
                  - code
                  - message
                properties:
                  code:
                    type: integer
                    format: int32
                    description: Error code
                    example: 401
                  error_code:
                    type: string
                    description: >-
                      Machine-readable semantic error code. Not a closed set;
                      initial values: sandbox_capacity_unavailable,
                      sandbox_placement_timeout, sandbox_no_compatible_node,
                      sandbox_create_failed, internal_server_error.
                  message:
                    type: string
                    description: Error
                type: object
              examples:
                missingAuthentication:
                  summary: No supported authentication header was supplied
                  value:
                    code: 401
                    message: authorization header is missing
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                required:
                  - code
                  - message
                properties:
                  code:
                    type: integer
                    format: int32
                    description: Error code
                    example: 403
                  error_code:
                    type: string
                    description: >-
                      Machine-readable semantic error code. Not a closed set;
                      initial values: sandbox_capacity_unavailable,
                      sandbox_placement_timeout, sandbox_no_compatible_node,
                      sandbox_create_failed, internal_server_error.
                  message:
                    type: string
                    description: Error
                type: object
              examples:
                teamBanned:
                  summary: The team is banned at authentication
                  value:
                    code: 403
                    message: team is banned
                teamBlocked:
                  summary: >-
                    The authenticated team is blocked. The message may append a
                    reason
                  value:
                    code: 403
                    message: team is blocked
        '404':
          description: Not found
          content:
            application/json:
              schema:
                required:
                  - code
                  - message
                properties:
                  code:
                    type: integer
                    format: int32
                    description: Error code
                    example: 404
                  error_code:
                    type: string
                    description: >-
                      Machine-readable semantic error code. Not a closed set;
                      initial values: sandbox_capacity_unavailable,
                      sandbox_placement_timeout, sandbox_no_compatible_node,
                      sandbox_create_failed, internal_server_error.
                  message:
                    type: string
                    description: Error
                type: object
              examples:
                sandboxNotFound:
                  summary: No accessible sandbox or saved snapshot was found
                  value:
                    code: 404
                    message: >-
                      Sandbox "sandboxid" doesn't exist or you don't have access
                      to it
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                required:
                  - code
                  - message
                properties:
                  code:
                    type: integer
                    format: int32
                    description: Error code
                    example: 409
                  error_code:
                    type: string
                    description: >-
                      Machine-readable semantic error code. Not a closed set;
                      initial values: sandbox_capacity_unavailable,
                      sandbox_placement_timeout, sandbox_no_compatible_node,
                      sandbox_create_failed, internal_server_error.
                  message:
                    type: string
                    description: Error
                type: object
              examples:
                stateConflict:
                  summary: The current sandbox state does not permit the operation
                  value:
                    code: 409
                    message: >-
                      Sandbox 'sandboxid' cannot be paused while in 'pausing'
                      state
        '429':
          description: Too many requests
          headers:
            Retry-After:
              description: >-
                When present, the number of seconds to wait before retrying the
                request.
              required: false
              schema:
                type: integer
                minimum: 0
              example: 30
            RateLimit-Limit:
              description: Configured rate-limit burst size.
              schema:
                type: integer
            RateLimit-Remaining:
              description: Requests remaining in the rate-limit window.
              schema:
                type: integer
            RateLimit-Reset:
              description: Seconds until the rate-limit window resets.
              schema:
                type: integer
          content:
            application/json:
              schema:
                required:
                  - code
                  - message
                properties:
                  code:
                    type: integer
                    format: int32
                    description: Error code
                    example: 429
                  error_code:
                    type: string
                    description: >-
                      Machine-readable semantic error code. Not a closed set;
                      initial values: sandbox_capacity_unavailable,
                      sandbox_placement_timeout, sandbox_no_compatible_node,
                      sandbox_create_failed, internal_server_error.
                  message:
                    type: string
                    description: Error
                type: object
              examples:
                rateLimitExceeded:
                  summary: A configured API rate limit was exceeded
                  value:
                    code: 429
                    message: Rate limit exceeded
        '500':
          description: Server error
          content:
            application/json:
              schema:
                required:
                  - code
                  - message
                properties:
                  code:
                    type: integer
                    format: int32
                    description: Error code
                    example: 500
                  error_code:
                    type: string
                    description: >-
                      Machine-readable semantic error code. Not a closed set;
                      initial values: sandbox_capacity_unavailable,
                      sandbox_placement_timeout, sandbox_no_compatible_node,
                      sandbox_create_failed, internal_server_error.
                  message:
                    type: string
                    description: Error
                type: object
              examples:
                operationFailed:
                  summary: The pause operation fails
                  value:
                    code: 500
                    message: Error pausing sandbox
        '503':
          description: Service unavailable
          content:
            application/json:
              schema:
                required:
                  - code
                  - message
                properties:
                  code:
                    type: integer
                    format: int32
                    description: Error code
                    example: 503
                  error_code:
                    type: string
                    description: >-
                      Machine-readable semantic error code. Not a closed set;
                      initial values: sandbox_capacity_unavailable,
                      sandbox_placement_timeout, sandbox_no_compatible_node,
                      sandbox_create_failed, internal_server_error.
                  message:
                    type: string
                    description: Error
                type: object
              examples:
                nodeBusy:
                  summary: The node cannot accept snapshot work
                  value:
                    code: 503
                    message: >-
                      Sandbox 'sandboxid' cannot be paused right now because its
                      node is busy, please retry
      security:
        - ApiKeyAuth: []
components:
  parameters:
    sandboxID:
      name: sandboxID
      in: path
      required: true
      schema:
        type: string
  schemas:
    SandboxPauseRequest:
      type: object
      properties:
        memory:
          type: boolean
          default: true
          description: >-
            Whether to capture a full memory snapshot. When false, only the
            filesystem is persisted and resuming the sandbox cold-boots
            (reboots) it from disk, losing in-memory state, running processes,
            and open connections. Resume it with an explicit request (connect or
            resume); auto-resume, which can be triggered by arbitrary traffic,
            refuses such a sandbox. Defaults to true.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````