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

# Schedule a volume for deletion



## OpenAPI

````yaml /api-reference/openapi.json delete /v1/volumes/{id}
openapi: 3.1.0
info:
  title: microsandbox cloud API
  description: >-
    REST API for microsandbox cloud: sandbox and volume lifecycle, organization
    context, quotas, usage, and audit events, authenticated with an organization
    API key.
  version: 0.1.0
servers:
  - url: https://api.microsandbox.dev
security:
  - api_key: []
paths:
  /v1/volumes/{id}:
    delete:
      tags:
        - Volumes
      summary: Schedule a volume for deletion
      operationId: delete_volume
      parameters:
        - name: id
          in: path
          description: Volume id
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Volume scheduled for deletion
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: invalid_api_key
                  message: unauthorized
                  details: null
        '404':
          description: Volume not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: sandbox_not_found
                  message: resource not found
                  details: null
        '409':
          description: The default volume cannot be deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: invalid_request
                  message: the host volume cannot be deleted
                  details: null
      security:
        - api_key: []
components:
  schemas:
    MessageResponse:
      type: object
      description: Simple message response for operations without a body.
      required:
        - message
      properties:
        message:
          type: string
    ErrorResponse:
      type: object
      description: Error envelope returned by every non-2xx response.
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Stable machine-readable error code, e.g. `invalid_api_key`.
            message:
              type: string
              description: Human-readable description of the error.
            details:
              type:
                - object
                - 'null'
              description: Optional structured context for the error.
  securitySchemes:
    api_key:
      type: http
      scheme: bearer
      description: Organization API key (msb_…) - org-scoped programmatic access.

````