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

# Bulk Delete

> Deletes documents matching a set of filter predicates.



## OpenAPI

````yaml /openapi/index-management.json post /api/v4/{customerId}/index/{crawlerId}/documents/bulk-delete
openapi: 3.1.0
info:
  title: Cludo Index Management API
  version: 4.0.0
  description: Index documents, bulk operations, and queue URLs for crawling.
servers:
  - url: https://api.cludo.com
    description: EU region (Customer IDs below 10,000,000)
  - url: https://api-us1.cludo.com
    description: US region (Customer IDs 10,000,000 and above)
security:
  - BasicAuth: []
paths:
  /api/v4/{customerId}/index/{crawlerId}/documents/bulk-delete:
    post:
      summary: Bulk Delete
      description: Deletes documents matching a set of filter predicates.
      operationId: bulkDeleteDocuments
      parameters:
        - $ref: '#/components/parameters/customerId'
        - $ref: '#/components/parameters/crawlerId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkDeleteRequest'
      responses:
        '200':
          description: Bulk delete completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkDeleteResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - BasicAuth: []
components:
  parameters:
    customerId:
      name: customerId
      in: path
      required: true
      description: Your Cludo Customer ID (same as in MyCludo and Basic auth username).
      schema:
        type: integer
    crawlerId:
      name: crawlerId
      in: path
      required: true
      description: 'Crawler (content source) ID from MyCludo. '
      schema:
        type: integer
  schemas:
    BulkDeleteRequest:
      type: object
      additionalProperties:
        $ref: '#/components/schemas/FilterDescriptor'
      description: >-
        Filter predicates keyed by indexed field name — use the same field names
        you set inside `fields` when pushing documents (e.g. `Title`, `Url`,
        `Category`, `Date`). Each value describes a comparison. Multiple filters
        are combined with logical **AND**.
      example:
        Url:
          operator: Eq
          values:
            - https://www.cludo.com
        Date_date:
          operator: Gte
          values:
            - 2023/07/19
    BulkDeleteResponse:
      type: object
      properties:
        success:
          type: boolean
          description: True when the bulk job completed without fatal errors.
        deleted:
          type: integer
          description: Documents removed matching the filter.
        failed:
          type: integer
          description: Documents that could not be deleted (partial failures).
        reason:
          type:
            - string
            - 'null'
          description: Error or warning text when `success` is false or `failed` > 0.
    FilterDescriptor:
      type: object
      required:
        - operator
      properties:
        operator:
          type: string
          default: Eq
          description: >-
            Comparison predicate. Supported values:

            `Eq` — equals (one or more values; matches any when multiple are
            provided)

            `Ne` — not equals (one or more values)

            `Gt` — greater than (one value)

            `Gte` — greater than or equal (one value)

            `Lt` — less than (one value)

            `Lte` — less than or equal (one value)

            `Between` — value falls between two operands inclusive (exactly two
            values)

            `Exists` — field is present on the document (omit `values`)
        values:
          type: array
          items:
            type: string
          description: >-
            Operand(s) for the comparison. Required for every operator except
            `Exists`. Use one value for `Gt`/`Gte`/`Lt`/`Lte`, two values for
            `Between`, and one or more for `Eq`/`Ne`. Numbers and dates are
            passed as strings.
    ErrorResponse:
      type: object
      description: Error response returned when a request fails.
      properties:
        message:
          type: string
          description: A message describing what went wrong.
    UnauthorizedError:
      type: object
      description: Returned when authentication fails.
      properties:
        message:
          type: string
          description: Authentication failure reason.
    ServerError:
      type: object
      description: Returned when an unexpected server error occurs.
      properties:
        status:
          type: string
          description: HTTP status name.
        code:
          type: integer
          description: HTTP status code.
        messages:
          type: array
          items:
            type: string
          description: Error details, usually including a support reference id.
  responses:
    BadRequest:
      description: >-
        The request is invalid. This typically occurs due to missing required
        fields, incorrect parameter values, or malformed request body.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            message: >-
              The request could not be processed. Check the request body and
              required parameters.
    Unauthorized:
      description: >-
        Authentication failed. The Authorization header is missing or contains
        invalid credentials.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UnauthorizedError'
          example:
            message: unauthorized
    InternalServerError:
      description: >-
        An unexpected server error occurred. If this persists, contact
        support@cludo.com.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ServerError'
          example:
            status: InternalServerError
            code: 500
            messages:
              - >-
                Error occur. Please contact support with error ID:
                a1b2c3d4-e5f6-7890-abcd-ef1234567890
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
      description: >-
        Basic authentication. Use your Customer ID as the username and API Key
        as the password. Example header: `Authorization: Basic
        MTIzNDU2NzpteS1hcGkta2V5`.

````