{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-q/json-schema/amazon-q-chat-sync-input-schema.json",
  "title": "ChatSyncInput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-q-conversations-api-openapi.yml#/components/schemas/ChatSyncInput",
  "type": "object",
  "properties": {
    "applicationId": {
      "type": "string",
      "description": "The identifier of the Amazon Q Business application linked to the Amazon Q Business conversation."
    },
    "userId": {
      "type": "string",
      "description": "The identifier of the user attached to the chat input."
    },
    "userGroups": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The group names that a user associated with the chat input belongs to."
    },
    "userMessage": {
      "type": "string",
      "description": "A end user message in a conversation."
    },
    "attachments": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AttachmentInput"
      },
      "description": "A list of files uploaded directly during chat. You can upload a maximum of 5 files of upto 10 MB each."
    },
    "actionExecution": {
      "$ref": "#/$defs/ActionExecution"
    },
    "authChallengeResponse": {
      "$ref": "#/$defs/AuthChallengeResponse"
    },
    "conversationId": {
      "type": "string",
      "description": "The identifier of the Amazon Q Business conversation."
    },
    "parentMessageId": {
      "type": "string",
      "description": "The identifier of the previous system message in a conversation."
    },
    "attributeFilter": {
      "$ref": "#/$defs/AttributeFilter"
    },
    "chatMode": {
      "type": "string",
      "enum": [
        "RETRIEVAL_MODE",
        "CREATOR_MODE",
        "PLUGIN_MODE"
      ],
      "description": "The chatMode parameter determines the chat modes available to Amazon Q Business users: RETRIEVAL_MODE - If you choose this mode, Amazon Q generates responses solely from the data sources connected and indexed by the application. If an answer is not found in the data sources or there are no data sources available, Amazon Q will respond with a \"No Answer Found\" message, unless LLM knowledge has been enabled. In that case, Amazon Q will generate a response from the LLM knowledge CREATOR_MODE - By selecting this mode, you can choose to generate responses only from the LLM knowledge. You can also a"
    },
    "chatModeConfiguration": {
      "$ref": "#/$defs/ChatModeConfiguration"
    },
    "clientToken": {
      "type": "string",
      "description": "A token that you provide to identify a chat request."
    }
  },
  "required": [
    "applicationId"
  ],
  "$defs": {
    "ActionExecution": {
      "type": "object",
      "properties": {
        "pluginId": {
          "type": "string",
          "description": "The identifier of the plugin the action is attached to."
        },
        "payload": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/ActionExecutionPayloadField"
          },
          "description": "A mapping of field names to the field values in input that an end user provides to Amazon Q Business requests to perform their plugin action."
        },
        "payloadFieldNameSeparator": {
          "type": "string",
          "description": "A string used to retain information about the hierarchical contexts within an action execution event payload."
        }
      },
      "required": [
        "pluginId",
        "payload",
        "payloadFieldNameSeparator"
      ]
    },
    "ActionExecutionPayloadField": {
      "type": "object",
      "properties": {
        "value": {
          "type": "object",
          "description": "The content of a user input field in an plugin action execution payload."
        }
      },
      "required": [
        "value"
      ]
    },
    "AttachmentInput": {
      "type": "object",
      "properties": {
        "data": {
          "type": "string",
          "format": "byte",
          "description": "The contents of the attachment."
        },
        "name": {
          "type": "string",
          "description": "The filename of the attachment."
        },
        "copyFrom": {
          "$ref": "#/$defs/CopyFromSource"
        }
      }
    },
    "AttributeFilter": {
      "type": "object",
      "properties": {
        "andAllFilters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AttributeFilter"
          },
          "description": "Performs a logical AND operation on all supplied filters."
        },
        "orAllFilters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AttributeFilter"
          },
          "description": "Performs a logical OR operation on all supplied filters."
        },
        "notFilter": {
          "$ref": "#/$defs/AttributeFilter"
        },
        "equalsTo": {
          "$ref": "#/$defs/DocumentAttribute"
        },
        "containsAll": {
          "$ref": "#/$defs/DocumentAttribute"
        },
        "containsAny": {
          "$ref": "#/$defs/DocumentAttribute"
        },
        "greaterThan": {
          "$ref": "#/$defs/DocumentAttribute"
        },
        "greaterThanOrEquals": {
          "$ref": "#/$defs/DocumentAttribute"
        },
        "lessThan": {
          "$ref": "#/$defs/DocumentAttribute"
        },
        "lessThanOrEquals": {
          "$ref": "#/$defs/DocumentAttribute"
        }
      }
    },
    "AuthChallengeResponse": {
      "type": "object",
      "properties": {
        "responseMap": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "The mapping of key-value pairs in an authentication challenge response."
        }
      },
      "required": [
        "responseMap"
      ]
    },
    "ChatModeConfiguration": {
      "type": "object",
      "properties": {
        "pluginConfiguration": {
          "$ref": "#/$defs/PluginConfiguration"
        }
      },
      "description": "Exactly one member is set."
    },
    "ConversationSource": {
      "type": "object",
      "properties": {
        "conversationId": {
          "type": "string",
          "description": "The unique identifier of the Amazon Q Business conversation."
        },
        "attachmentId": {
          "type": "string",
          "description": "The unique identifier of the Amazon Q Business attachment."
        }
      },
      "required": [
        "conversationId",
        "attachmentId"
      ]
    },
    "CopyFromSource": {
      "type": "object",
      "properties": {
        "conversation": {
          "$ref": "#/$defs/ConversationSource"
        }
      },
      "description": "Exactly one member is set."
    },
    "DocumentAttribute": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The identifier for the attribute."
        },
        "value": {
          "$ref": "#/$defs/DocumentAttributeValue"
        }
      },
      "required": [
        "name",
        "value"
      ]
    },
    "DocumentAttributeValue": {
      "type": "object",
      "properties": {
        "stringValue": {
          "type": "string",
          "description": "A string."
        },
        "stringListValue": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of strings."
        },
        "longValue": {
          "type": "integer",
          "description": "A long integer value."
        },
        "dateValue": {
          "type": "string",
          "format": "date-time",
          "description": "A date expressed as an ISO 8601 string. It's important for the time zone to be included in the ISO 8601 date-time format. For example, 2012-03-25T12:30:10+01:00 is the ISO 8601 date-time format for March 25th 2012 at 12:30PM (plus 10 seconds) in Central European Time."
        }
      },
      "description": "Exactly one member is set."
    },
    "PluginConfiguration": {
      "type": "object",
      "properties": {
        "pluginId": {
          "type": "string",
          "description": "The identifier of the plugin you want to use."
        }
      },
      "required": [
        "pluginId"
      ]
    }
  }
}