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

# Delete Batch Sessions

> Deletes all sessions in a batch. Running sessions will be terminated
and all session data will be removed.




## OpenAPI

````yaml /openapi.yaml delete /v1/batch-sessions/{batch_id}
openapi: 3.1.0
info:
  title: AnchorBrowser API
  version: 1.0.0
  description: APIs to manage all browser-related actions and configuration.
servers:
  - url: https://api.anchorbrowser.io
    description: API server
security: []
paths:
  /v1/batch-sessions/{batch_id}:
    delete:
      tags:
        - Batch Sessions
      summary: Delete Batch Sessions
      description: |
        Deletes all sessions in a batch. Running sessions will be terminated
        and all session data will be removed.
      parameters:
        - name: batch_id
          in: path
          required: true
          description: The unique identifier of the batch
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Batch sessions deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/BatchSessionDeleteResponseSchema'
        '401':
          description: Invalid API Key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Batch not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - api_key_header: []
components:
  schemas:
    BatchSessionDeleteResponseSchema:
      type: object
      properties:
        batch_id:
          type: string
          format: uuid
          description: Unique identifier for the batch
        deleted_sessions:
          type: integer
          description: Number of sessions successfully deleted
        failed_deletions:
          type: integer
          description: Number of sessions that failed to delete
        errors:
          type: array
          items:
            type: object
            properties:
              session_id:
                type: string
                description: ID of the session that failed to delete
              error:
                type: string
                description: Error message
          description: Details of deletion failures (only present if there were failures)
        message:
          type: string
          description: Summary message of the deletion operation
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
            message:
              type: string
  securitySchemes:
    api_key_header:
      type: apiKey
      in: header
      name: anchor-api-key
      description: API key passed in the header

````