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

# Bulk Delete Sandboxes Endpoint

> Bulk delete multiple sandboxes by IDs or labels

## Rate Limit

50 requests per 60 seconds per IP and token.


## OpenAPI

````yaml https://api.primeintellect.ai/openapi.json delete /api/v1/sandbox
openapi: 3.1.0
info:
  title: PI API
  version: 0.1.0
servers:
  - url: https://api.primeintellect.ai
security: []
paths:
  /api/v1/sandbox:
    delete:
      tags:
        - Sandbox
      summary: Bulk Delete Sandboxes Endpoint
      description: Bulk delete multiple sandboxes by IDs or labels
      operationId: bulk_delete_sandboxes_endpoint_api_v1_sandbox_delete
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkDeleteSandboxRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkDeleteSandboxResponse'
        '401':
          description: Authorization failed
        '422':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    BulkDeleteSandboxRequest:
      properties:
        sandbox_ids:
          anyOf:
            - items:
                type: string
              type: array
              maxItems: 500
              minItems: 1
            - type: 'null'
          title: Sandbox Ids
          description: List of sandbox IDs to delete
        labels:
          anyOf:
            - items:
                type: string
              type: array
              maxItems: 50
              minItems: 1
            - type: 'null'
          title: Labels
          description: List of labels - delete all sandboxes with ALL these labels
        team_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Team Id
          description: >-
            Scope deletion to sandboxes in this team. Required when all_users is
            true or when targeting another user's sandboxes.
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
          description: >-
            Scope deletion to sandboxes owned by this user. Defaults to the
            authenticated caller unless all_users is true. Targeting another
            user's ID requires team admin role on team_id.
        all_users:
          type: boolean
          title: All Users
          description: >-
            Delete sandboxes across all users in the given team_id. Requires
            team admin role on team_id.
          default: false
      type: object
      title: BulkDeleteSandboxRequest
    BulkDeleteSandboxResponse:
      properties:
        succeeded:
          items:
            type: string
          type: array
          title: Succeeded
          description: List of successfully deleted sandbox IDs
        failed:
          items:
            additionalProperties:
              type: string
            type: object
          type: array
          title: Failed
          description: List of failed deletions with error messages
        message:
          type: string
          title: Message
      type: object
      required:
        - message
      title: BulkDeleteSandboxResponse
    ErrorResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Errors
      type: object
      required:
        - errors
      title: ErrorResponse
    ErrorDetail:
      properties:
        param:
          type: string
          title: Param
        details:
          type: string
          title: Details
      type: object
      required:
        - param
        - details
      title: ErrorDetail
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````