> ## 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.

# Single Delete

> Deletes one document from the index by its document ID, supplied as the required `documentId` query parameter.

The document ID is the same value you used as `id` when indexing the document. For most integrations this is the document's **canonical URL** (e.g. `https://example.com/products/widget-pro`), not an internal numeric key.

When the document ID contains reserved characters — which a full URL typically does (`?`, `&`, `=`, `#`, spaces) — URL-encode it before adding it to the query string so it is parsed correctly (e.g. `documentId=https%3A%2F%2Fexample.com%2Fproducts%2Fwidget-pro`).



## OpenAPI

````yaml /openapi/index-management.json delete /api/v4/{customerId}/index/{crawlerId}/documents
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:
    delete:
      summary: Single Delete
      description: >-
        Deletes one document from the index by its document ID, supplied as the
        required `documentId` query parameter.


        The document ID is the same value you used as `id` when indexing the
        document. For most integrations this is the document's **canonical URL**
        (e.g. `https://example.com/products/widget-pro`), not an internal
        numeric key.


        When the document ID contains reserved characters — which a full URL
        typically does (`?`, `&`, `=`, `#`, spaces) — URL-encode it before
        adding it to the query string so it is parsed correctly (e.g.
        `documentId=https%3A%2F%2Fexample.com%2Fproducts%2Fwidget-pro`).
      operationId: deleteSingleDocument
      parameters:
        - $ref: '#/components/parameters/customerId'
        - $ref: '#/components/parameters/crawlerId'
        - $ref: '#/components/parameters/documentId'
      responses:
        '200':
          description: Document deleted successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteSingleDocumentResponse'
        '400':
          description: >-
            The document could not be deleted. This typically occurs when no
            document with the given ID exists in the index.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FailDeleteDocumentResponse'
              example:
                failed: 1
                reason: Deletion for document with Id 2 failed
        '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
    documentId:
      name: documentId
      in: query
      required: true
      description: >-
        The document ID to delete — the same string you used as `id` when
        indexing. For most integrations this is the document's **canonical URL**
        (e.g. `https://example.com/products/widget-pro`). Because the value is
        usually a full URL, it must be **URL-encoded** in the query string (e.g.
        `documentId=https%3A%2F%2Fexample.com%2Fproducts%2Fwidget-pro`).
      schema:
        type: string
      example: https://example.com/products/widget-pro
  schemas:
    DeleteSingleDocumentResponse:
      type: object
      properties:
        deleted:
          type: integer
          enum:
            - 0
            - 1
          example: 1
          description: '`1` when the document was removed, `0` if nothing matched.'
    FailDeleteDocumentResponse:
      type: object
      properties:
        failed:
          type: integer
          example: 1
          description: >-
            Number of documents that failed to delete (always `1` for this
            endpoint since it operates on a single document).
        reason:
          type: string
          example: Deletion for document with Id 2 failed
          description: >-
            Human-readable reason the deletion failed. Typically indicates that
            no document with the given ID exists in the index.
    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:
    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`.

````