{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-bedrock/json-schema/amazon-bedrock-delete-knowledge-base-documents-request-schema.json",
  "title": "DeleteKnowledgeBaseDocumentsRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-bedrock-documents-api-openapi.yml#/components/schemas/DeleteKnowledgeBaseDocumentsRequest",
  "type": "object",
  "properties": {
    "knowledgeBaseId": {
      "type": "string",
      "description": "The unique identifier of the knowledge base that is connected to the data source."
    },
    "dataSourceId": {
      "type": "string",
      "description": "The unique identifier of the data source that contains the documents."
    },
    "clientToken": {
      "type": "string",
      "description": "A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency."
    },
    "documentIdentifiers": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DocumentIdentifier"
      },
      "description": "A list of objects, each of which contains information to identify a document to delete."
    }
  },
  "required": [
    "knowledgeBaseId",
    "dataSourceId",
    "documentIdentifiers"
  ],
  "$defs": {
    "BedrockAgentS3Location": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string",
          "description": "The location's URI. For example, s3://my-bucket/chunk-processor/."
        }
      },
      "required": [
        "uri"
      ]
    },
    "CustomDocumentIdentifier": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The identifier of the document to ingest into a custom data source."
        }
      },
      "required": [
        "id"
      ]
    },
    "DocumentIdentifier": {
      "type": "object",
      "properties": {
        "dataSourceType": {
          "type": "string",
          "enum": [
            "CUSTOM",
            "S3"
          ],
          "description": "The type of data source connected to the knowledge base that contains the document."
        },
        "s3": {
          "$ref": "#/$defs/BedrockAgentS3Location"
        },
        "custom": {
          "$ref": "#/$defs/CustomDocumentIdentifier"
        }
      },
      "required": [
        "dataSourceType"
      ]
    }
  }
}