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

# Stop a sandbox

> Accepts graceful or immediate shutdown. Repeating this request for a stopped or failed sandbox is safe.



## OpenAPI

````yaml /api-reference/openapi.yaml post /sandboxes/{id}/stop
openapi: 3.1.0
info:
  title: Thunder Sandbox API
  version: '1.0'
  description: Create, inspect, list, and stop Thunder sandboxes.
  contact:
    name: Thunder Compute Support
    url: https://www.thundercompute.com/contact
    email: support@thundercompute.com
servers:
  - url: https://api.thundercompute.com:8443/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Sandboxes
    description: Short-lived isolated compute environments.
paths:
  /sandboxes/{id}/stop:
    post:
      tags:
        - Sandboxes
      summary: Stop a sandbox
      description: >-
        Accepts graceful or immediate shutdown. Repeating this request for a
        stopped or failed sandbox is safe.
      operationId: stopSandbox
      parameters:
        - $ref: '#/components/parameters/SandboxID'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SandboxStopRequest'
            example:
              graceful: true
      responses:
        '202':
          description: Stop accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SandboxStopResponse'
              example:
                name: training-run
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/Unavailable'
components:
  parameters:
    SandboxID:
      name: id
      in: path
      required: true
      description: Permanent API-assigned sandbox ID.
      schema:
        type: string
        pattern: ^sbx-[a-f0-9]{16}$
      example: sbx-0123456789abcdef
  schemas:
    SandboxStopRequest:
      type: object
      properties:
        graceful:
          type: boolean
          default: false
          description: Attempt guest shutdown before forcing the VM to stop.
    SandboxStopResponse:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          description: Label of the sandbox whose stop was accepted.
    Error:
      type: object
      required:
        - error
        - message
        - code
      properties:
        error:
          type: string
          description: Stable machine-readable error code.
          example: invalid_request
        message:
          type: string
          description: Human-readable explanation.
          example: Invalid request body
        code:
          type: integer
          description: HTTP status code.
          example: 400
  responses:
    BadRequest:
      description: Invalid request or pagination parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing, invalid, or expired bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Sandbox access is not enabled for the organization.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Sandbox ID was not found in the organization.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: Rate limit exceeded. Honor the Retry-After header.
      headers:
        Retry-After:
          description: Seconds until another request should be attempted.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalError:
      description: Sandbox request failed unexpectedly.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unavailable:
      description: >-
        Capacity, access verification, control plane, or scheduler is
        unavailable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API token
      description: API token created in the Thunder console.

````