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

# Delete all snapshots of a sandbox

> Delete every ordinary snapshot of one sandbox and keep the sandbox and its named snapshots. Same as boat snapshot delete --all.



## OpenAPI

````yaml openapi/boat-v1.yaml DELETE /sandboxes/{sandboxId}/snapshots
openapi: 3.1.0
info:
  title: Boat Public API v1
  version: 1.0.0
  description: >
    Public JSON API for creating, operating, prompting, observing, and exposing
    sandboxes from backend services, CI jobs, hosted workers, and Boat
    automation products.


    The v1 reference intentionally documents the developer integration surface
    only. Dashboard billing actions are not part of v1.
servers:
  - url: https://boat.dev/api/v1
security:
  - BoatBearerAuth: []
tags:
  - name: Boat
    description: >-
      Unified Boat account, setup, lifecycle, prompting, event history, desktop
      access, and SSH operations.
paths:
  /sandboxes/{sandboxId}/snapshots:
    delete:
      tags:
        - Boat
      summary: Permanently delete all snapshots of a sandbox
      description: >-
        Accept irreversible deletion of every unpinned snapshot of this sandbox.
        The sandbox itself and its named snapshots stay. Snapshots disappear
        from lists, restores and forks immediately; their stored data is purged
        in the background. Set `X-Ascii-Confirm-Delete` to the sandbox id.
      operationId: deleteSandboxSnapshots
      parameters:
        - $ref: '#/components/parameters/SandboxId'
        - $ref: '#/components/parameters/ConfirmDelete'
      responses:
        '202':
          description: One accepted deletion operation per snapshot.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletionOperationListResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
components:
  parameters:
    SandboxId:
      name: sandboxId
      in: path
      required: true
      schema:
        type: string
        pattern: ^bx_[23456789abcdefghjkmnpqrstuvwxyz]{8}$
      description: Public Sandbox id returned by create/list/get sandbox calls.
    ConfirmDelete:
      name: X-Ascii-Confirm-Delete
      in: header
      required: true
      schema:
        type: string
      description: >-
        Must exactly equal the target `sandboxId` or `snapshotId`. A missing or
        mismatched value returns `409` without accepting deletion.
  schemas:
    DeletionOperationListResponse:
      allOf:
        - $ref: '#/components/schemas/SuccessBase'
        - type: object
          required:
            - operations
          properties:
            type:
              type: string
              enum:
                - snapshot.deleting
            operations:
              type: array
              items:
                $ref: '#/components/schemas/DeletionOperation'
    SuccessBase:
      type: object
      required:
        - ok
        - type
      properties:
        ok:
          type: boolean
          examples:
            - true
        type:
          type: string
          description: Stable success envelope discriminator added by v1.
    DeletionOperation:
      type: object
      required:
        - id
        - kind
        - targetId
        - reason
        - status
        - attemptCount
        - requestedAt
        - completedAt
      properties:
        id:
          type: string
          pattern: ^bdop_[a-f0-9]{32}$
        kind:
          type: string
          enum:
            - sandbox
            - snapshot
        targetId:
          type: string
        reason:
          type: string
          enum:
            - explicit
            - zdr
            - account
        status:
          type: string
          enum:
            - pending
            - processing
            - blocked
            - completed
        stage:
          type: string
          enum:
            - removing
            - waiting_for_uploads
            - retrying
            - completed
          description: >-
            What the background purge is doing. The target is already gone from
            every list, restore and fork once the operation exists.
            `waiting_for_uploads`: stored data is erased once the last upload
            URL issued for it expires (`expectedBy`). `retrying`: a transient
            fault, retried automatically. `completed`: a newer snapshot, a fork
            or a named snapshot made from it keeps the data it reads, until that
            is deleted too.
        expectedBy:
          type:
            - string
            - 'null'
          format: date-time
          description: When `waiting_for_uploads` ends.
        attemptCount:
          type: integer
          minimum: 0
        requestedAt:
          type: string
          format: date-time
        completedAt:
          type:
            - string
            - 'null'
          format: date-time
    ErrorEnvelope:
      type: object
      required:
        - ok
        - type
        - status
        - code
        - message
        - error
        - requestId
      properties:
        ok:
          type: boolean
          examples:
            - false
        type:
          type: string
          examples:
            - sandbox.error
        status:
          type: integer
          examples:
            - 409
        code:
          type: string
          examples:
            - provider_not_configured
        message:
          type: string
          examples:
            - Prompting is locked until Codex is configured on the Agents page.
        requestId:
          type: string
          examples:
            - req_01HX...
        error:
          type: object
          required:
            - code
            - message
            - status
          properties:
            code:
              type: string
            message:
              type: string
            status:
              type: integer
            details:
              type: object
              additionalProperties: true
  responses:
    Unauthorized:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            unauthorized:
              value:
                ok: false
                type: sandbox.error
                status: 401
                code: unauthorized
                message: Unauthorized
                error:
                  code: unauthorized
                  message: Unauthorized
                  status: 401
                requestId: req_01HX...
    Forbidden:
      description: Authenticated token is not allowed to perform this action.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            forbidden:
              value:
                ok: false
                type: sandbox.error
                status: 403
                code: forbidden
                message: Forbidden
                error:
                  code: forbidden
                  message: Forbidden
                  status: 403
                requestId: req_01HX...
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Conflict:
      description: Request conflicts with current account or sandbox state.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  securitySchemes:
    BoatBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: sandbox_api_key
      description: >-
        Boat bearer token in the form `boat_...`. Service API keys authenticate
        sandbox operations.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.