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

# Delete many sandboxes

> Deletes up to 500 sandboxes in one request. Each sandbox moves to `deleting`, then to `deleted`. The API returns a result for each ID, in the sequence of the IDs: the ID, and an error message if the delete failed. Needs the `sandboxes:write` scope.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/sandboxes/delete-many
openapi: 3.1.0
info:
  title: VMS API
  version: 1.0.0
  description: >-
    The public API of a VMS workspace. Each request needs an API key of the
    workspace in the Authorization header.
servers:
  - url: https://vms.dev/api
    description: The VMS API
security:
  - apiKey: []
paths:
  /v1/sandboxes/delete-many:
    post:
      tags:
        - Sandboxes
      summary: Delete many sandboxes
      description: >-
        Deletes up to 500 sandboxes in one request. Each sandbox moves to
        `deleting`, then to `deleted`. The API returns a result for each ID, in
        the sequence of the IDs: the ID, and an error message if the delete
        failed. Needs the `sandboxes:write` scope.
      operationId: deleteManySandboxes
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteManySandboxesBody'
      responses:
        '200':
          description: A result for each ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SandboxBulkResult'
        '400':
          description: The request is not valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: The API key is missing, not correct, revoked, or expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The API key does not have the scope of the endpoint.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: The API key sent more than 1,200 requests in one minute.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    DeleteManySandboxesBody:
      type: object
      properties:
        ids:
          minItems: 1
          maxItems: 500
          type: array
          items:
            type: string
            minLength: 1
      required:
        - ids
    SandboxBulkResult:
      type: object
      properties:
        succeeded:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        failed:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        message:
          type:
            - string
            - 'null'
        data:
          type: array
          items:
            type: object
            properties:
              index:
                type: integer
                minimum: -9007199254740991
                maximum: 9007199254740991
              id:
                type:
                  - string
                  - 'null'
              error:
                type:
                  - string
                  - 'null'
            required:
              - index
              - id
              - error
            additionalProperties: false
      required:
        - succeeded
        - failed
        - message
        - data
      additionalProperties: false
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: no_capacity
            message:
              type: string
            requestId:
              type:
                - string
                - 'null'
            retryAfterSeconds:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            sandboxId:
              description: The sandbox that the error is about.
              type: string
          required:
            - code
            - message
            - requestId
          additionalProperties: false
      required:
        - error
      additionalProperties: false
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: An API key that starts with vms_. Make one in Settings > API keys.

````

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