> ## 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 Tunnels Endpoint

> Bulk soft-delete multiple tunnels by IDs or labels.

## Rate Limit

100 requests per 60 seconds per user.


## OpenAPI

````yaml https://api.primeintellect.ai/openapi.json delete /api/v1/tunnel
openapi: 3.1.0
info:
  title: PI API
  version: 0.1.0
servers:
  - url: https://api.primeintellect.ai
security: []
paths:
  /api/v1/tunnel:
    delete:
      tags:
        - Tunnel
      summary: Bulk Delete Tunnels Endpoint
      description: Bulk soft-delete multiple tunnels by IDs or labels.
      operationId: bulk_delete_tunnels_endpoint_api_v1_tunnel_delete
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkDeleteTunnelRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkDeleteTunnelResponse'
        '401':
          description: Authorization failed
        '422':
          description: Invalid request data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    BulkDeleteTunnelRequest:
      properties:
        tunnel_ids:
          anyOf:
            - items:
                type: string
              type: array
              maxItems: 500
              minItems: 1
            - type: 'null'
          title: Tunnel Ids
          description: List of tunnel IDs to delete
        labels:
          anyOf:
            - items:
                type: string
              type: array
              maxItems: 50
              minItems: 1
            - type: 'null'
          title: Labels
          description: List of labels - delete all tunnels with ALL these labels
        status:
          anyOf:
            - $ref: '#/components/schemas/TunnelStatus'
            - type: 'null'
          description: >-
            Delete only tunnels currently in this status. Must be an active
            status (pending, connected, disconnected)
        teamId:
          anyOf:
            - type: string
            - type: 'null'
          title: Teamid
          description: Scope deletion to tunnels in this team
        userId:
          anyOf:
            - type: string
            - type: 'null'
          title: Userid
          description: Scope deletion to tunnels owned by this user
        allUsers:
          type: boolean
          title: Allusers
          description: Delete tunnels across all users in the given team
          default: false
      type: object
      title: BulkDeleteTunnelRequest
      description: Request to bulk delete tunnels.
    BulkDeleteTunnelResponse:
      properties:
        succeeded:
          items:
            type: string
          type: array
          title: Succeeded
          description: Successfully deleted tunnel IDs
        failed:
          items:
            additionalProperties:
              type: string
            type: object
          type: array
          title: Failed
          description: Failed deletions with error messages
        message:
          type: string
          title: Message
          description: Summary message
      type: object
      required:
        - message
      title: BulkDeleteTunnelResponse
      description: Response for bulk tunnel deletion.
    ErrorResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          title: Errors
      type: object
      required:
        - errors
      title: ErrorResponse
    TunnelStatus:
      type: string
      enum:
        - pending
        - connected
        - disconnected
        - expired
        - terminated
      title: TunnelStatus
    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

````