{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-q/json-schema/amazon-q-list-documents-response-schema.json",
  "title": "ListDocumentsResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-q-documents-api-openapi.yml#/components/schemas/ListDocumentsResponse",
  "type": "object",
  "properties": {
    "documentDetailList": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DocumentDetails"
      },
      "description": "A list of document details."
    },
    "nextToken": {
      "type": "string",
      "description": "If the maxResults response was incomplete because there is more data to retrieve, Amazon Q Business returns a pagination token in the response. You can use this pagination token to retrieve the next set of documents."
    }
  },
  "$defs": {
    "DocumentDetails": {
      "type": "object",
      "properties": {
        "documentId": {
          "type": "string",
          "description": "The identifier of the document."
        },
        "status": {
          "type": "string",
          "enum": [
            "RECEIVED",
            "PROCESSING",
            "INDEXED",
            "UPDATED",
            "FAILED",
            "DELETING",
            "DELETED",
            "DOCUMENT_FAILED_TO_INDEX"
          ],
          "description": "The current status of the document."
        },
        "error": {
          "$ref": "#/$defs/ErrorDetail"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp for when the document was created."
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The timestamp for when the document was last updated."
        }
      }
    },
    "ErrorDetail": {
      "type": "object",
      "properties": {
        "errorMessage": {
          "type": "string",
          "description": "The message explaining the Amazon Q Business request error."
        },
        "errorCode": {
          "type": "string",
          "enum": [
            "InternalError",
            "InvalidRequest",
            "ResourceInactive",
            "ResourceNotFound"
          ],
          "description": "The code associated with the Amazon Q Business request error."
        }
      }
    }
  }
}