{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-q/json-schema/amazon-q-create-session-request-schema.json",
  "title": "CreateSessionRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-q-sessions-api-openapi.yml#/components/schemas/CreateSessionRequest",
  "type": "object",
  "properties": {
    "clientToken": {
      "type": "string",
      "description": "A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs."
    },
    "assistantId": {
      "type": "string",
      "description": "The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN."
    },
    "name": {
      "type": "string",
      "description": "The name of the session."
    },
    "description": {
      "type": "string",
      "description": "The description."
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The tags used to organize, track, or control access for this resource."
    },
    "tagFilter": {
      "$ref": "#/$defs/TagFilter"
    },
    "aiAgentConfiguration": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/AIAgentConfigurationData"
      },
      "description": "The configuration of the AI Agents (mapped by AI Agent Type to AI Agent version) that should be used by Amazon Q in Connect for this Session."
    },
    "contactArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the email contact in Connect Customer. Used to retrieve email content and establish session context for AI-powered email assistance."
    },
    "orchestratorConfigurationList": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/OrchestratorConfigurationEntry"
      },
      "description": "The list of orchestrator configurations for the session being created."
    },
    "removeOrchestratorConfigurationList": {
      "type": "boolean",
      "description": "The list of orchestrator configurations to remove from the session."
    }
  },
  "required": [
    "assistantId",
    "name"
  ],
  "$defs": {
    "AIAgentConfigurationData": {
      "type": "object",
      "properties": {
        "aiAgentId": {
          "type": "string",
          "description": "The ID of the AI Agent to be configured."
        },
        "enabled": {
          "type": "boolean",
          "description": "Indicates whether the AI Agent configured for this AI Agent type is enabled. When this value is omitted or set to true, the configured AI Agent runs; when set to false, the AI Agent ID is retained but no AI Agent runs for the AI Agent type. Setting this value to false is currently supported only for the ANSWER_RECOMMENDATION AI Agent type; other requests to set it to false are rejected with a validation error."
        }
      },
      "required": [
        "aiAgentId"
      ]
    },
    "OrCondition": {
      "type": "object",
      "properties": {
        "andConditions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TagCondition"
          },
          "description": "A list of conditions which would be applied together with an AND condition."
        },
        "tagCondition": {
          "$ref": "#/$defs/TagCondition"
        }
      },
      "description": "Exactly one member is set."
    },
    "OrchestratorConfigurationEntry": {
      "type": "object",
      "properties": {
        "aiAgentId": {
          "type": "string",
          "description": "The identifier of the AI Agent in the orchestrator configuration."
        },
        "orchestratorUseCase": {
          "type": "string",
          "description": "The use case for the orchestrator configuration. (for example Connect.SelfService, Connect.AgentAssistance)"
        }
      },
      "required": [
        "orchestratorUseCase"
      ]
    },
    "TagCondition": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The tag key in the tag condition."
        },
        "value": {
          "type": "string",
          "description": "The tag value in the tag condition."
        }
      },
      "required": [
        "key"
      ]
    },
    "TagFilter": {
      "type": "object",
      "properties": {
        "tagCondition": {
          "$ref": "#/$defs/TagCondition"
        },
        "andConditions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TagCondition"
          },
          "description": "A list of conditions which would be applied together with an AND condition."
        },
        "orConditions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/OrCondition"
          },
          "description": "A list of conditions which would be applied together with an OR condition."
        }
      },
      "description": "Exactly one member is set."
    }
  }
}