{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-lex/json-schema/amazon-lex-put-intent-request-schema.json",
  "title": "PutIntentRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-lex-versions-api-openapi.yml#/components/schemas/PutIntentRequest",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the intent. The name is not case sensitive. The name can't match a built-in intent name, or a built-in intent name with \"AMAZON.\" removed. For example, because there is a built-in intent called AMAZON.HelpIntent, you can't create a custom intent called HelpIntent. For a list of built-in intents, see Standard Built-in Intents in the Alexa Skills Kit."
    },
    "description": {
      "type": "string",
      "description": "A description of the intent."
    },
    "slots": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ModelsLexSlot"
      },
      "description": "An array of intent slots. At runtime, Amazon Lex elicits required slot values from the user using prompts defined in the slots. For more information, see how-it-works."
    },
    "sampleUtterances": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "An array of utterances (strings) that a user might say to signal the intent. For example, \"I want {PizzaSize} pizza\", \"Order {Quantity} {PizzaSize} pizzas\". In each utterance, a slot name is enclosed in curly braces."
    },
    "confirmationPrompt": {
      "$ref": "#/$defs/Prompt"
    },
    "rejectionStatement": {
      "$ref": "#/$defs/Statement"
    },
    "followUpPrompt": {
      "$ref": "#/$defs/FollowUpPrompt"
    },
    "conclusionStatement": {
      "$ref": "#/$defs/Statement"
    },
    "dialogCodeHook": {
      "$ref": "#/$defs/CodeHook"
    },
    "fulfillmentActivity": {
      "$ref": "#/$defs/FulfillmentActivity"
    },
    "parentIntentSignature": {
      "type": "string",
      "description": "A unique identifier for the built-in intent to base this intent on. To find the signature for an intent, see Standard Built-in Intents in the Alexa Skills Kit."
    },
    "checksum": {
      "type": "string",
      "description": "Identifies a specific revision of the $LATEST version. When you create a new intent, leave the checksum field blank. If you specify a checksum you get a BadRequestException exception. When you want to update a intent, set the checksum field to the checksum of the most recent revision of the $LATEST version. If you don't specify the checksum field, or if the checksum does not match the $LATEST version, you get a PreconditionFailedException exception."
    },
    "createVersion": {
      "type": "boolean",
      "description": "When set to true a new numbered version of the intent is created. This is the same as calling the CreateIntentVersion operation. If you do not specify createVersion, the default is false."
    },
    "kendraConfiguration": {
      "$ref": "#/$defs/ModelsLexKendraConfiguration"
    },
    "inputContexts": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/InputContext"
      },
      "description": "An array of InputContext objects that lists the contexts that must be active for Amazon Lex to choose the intent in a conversation with the user."
    },
    "outputContexts": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ModelsLexOutputContext"
      },
      "description": "An array of OutputContext objects that lists the contexts that the intent activates when the intent is fulfilled."
    }
  },
  "required": [
    "name"
  ],
  "$defs": {
    "CodeHook": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the Lambda function."
        },
        "messageVersion": {
          "type": "string",
          "description": "The version of the request-response that you want Amazon Lex to use to invoke your Lambda function. For more information, see using-lambda."
        }
      },
      "required": [
        "uri",
        "messageVersion"
      ]
    },
    "FollowUpPrompt": {
      "type": "object",
      "properties": {
        "prompt": {
          "$ref": "#/$defs/Prompt"
        },
        "rejectionStatement": {
          "$ref": "#/$defs/Statement"
        }
      },
      "required": [
        "prompt",
        "rejectionStatement"
      ]
    },
    "FulfillmentActivity": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "ReturnIntent",
            "CodeHook"
          ],
          "description": "How the intent should be fulfilled, either by running a Lambda function or by returning the slot data to the client application."
        },
        "codeHook": {
          "$ref": "#/$defs/CodeHook"
        }
      },
      "required": [
        "type"
      ]
    },
    "InputContext": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the context."
        }
      },
      "required": [
        "name"
      ]
    },
    "ModelsLexKendraConfiguration": {
      "type": "object",
      "properties": {
        "kendraIndex": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the Amazon Kendra index that you want the AMAZON.KendraSearchIntent intent to search. The index must be in the same account and Region as the Amazon Lex bot. If the Amazon Kendra index does not exist, you get an exception when you call the PutIntent operation."
        },
        "queryFilterString": {
          "type": "string",
          "description": "A query filter that Amazon Lex sends to Amazon Kendra to filter the response from the query. The filter is in the format defined by Amazon Kendra. For more information, see Filtering queries. You can override this filter string with a new filter string at runtime."
        },
        "role": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of an IAM role that has permission to search the Amazon Kendra index. The role must be in the same account and Region as the Amazon Lex bot. If the role does not exist, you get an exception when you call the PutIntent operation."
        }
      },
      "required": [
        "kendraIndex",
        "role"
      ]
    },
    "ModelsLexMessage": {
      "type": "object",
      "properties": {
        "contentType": {
          "type": "string",
          "enum": [
            "PlainText",
            "SSML",
            "CustomPayload"
          ],
          "description": "The content type of the message string."
        },
        "content": {
          "type": "string",
          "description": "The text of the message."
        },
        "groupNumber": {
          "type": "integer",
          "description": "Identifies the message group that the message belongs to. When a group is assigned to a message, Amazon Lex returns one message from each group in the response."
        }
      },
      "required": [
        "contentType",
        "content"
      ]
    },
    "ModelsLexOutputContext": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the context."
        },
        "timeToLiveInSeconds": {
          "type": "integer",
          "description": "The number of seconds that the context should be active after it is first sent in a PostContent or PostText response. You can set the value between 5 and 86,400 seconds (24 hours)."
        },
        "turnsToLive": {
          "type": "integer",
          "description": "The number of conversation turns that the context should be active. A conversation turn is one PostContent or PostText request and the corresponding response from Amazon Lex."
        }
      },
      "required": [
        "name",
        "timeToLiveInSeconds",
        "turnsToLive"
      ]
    },
    "ModelsLexSlot": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the slot."
        },
        "description": {
          "type": "string",
          "description": "A description of the slot."
        },
        "slotConstraint": {
          "type": "string",
          "enum": [
            "Required",
            "Optional"
          ],
          "description": "Specifies whether the slot is required or optional."
        },
        "slotType": {
          "type": "string",
          "description": "The type of the slot, either a custom slot type that you defined or one of the built-in slot types."
        },
        "slotTypeVersion": {
          "type": "string",
          "description": "The version of the slot type."
        },
        "valueElicitationPrompt": {
          "$ref": "#/$defs/Prompt"
        },
        "priority": {
          "type": "integer",
          "description": "Directs Amazon Lex the order in which to elicit this slot value from the user. For example, if the intent has two slots with priorities 1 and 2, AWS Amazon Lex first elicits a value for the slot with priority 1. If multiple slots share the same priority, the order in which Amazon Lex elicits values is arbitrary."
        },
        "sampleUtterances": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "If you know a specific pattern with which users might respond to an Amazon Lex request for a slot value, you can provide those utterances to improve accuracy. This is optional. In most cases, Amazon Lex is capable of understanding user utterances."
        },
        "responseCard": {
          "type": "string",
          "description": "A set of possible responses for the slot type used by text-based clients. A user chooses an option from the response card, instead of using text to reply."
        },
        "obfuscationSetting": {
          "type": "string",
          "enum": [
            "NONE",
            "DEFAULT_OBFUSCATION"
          ],
          "description": "Determines whether a slot is obfuscated in conversation logs and stored utterances. When you obfuscate a slot, the value is replaced by the slot name in curly braces ({}). For example, if the slot name is \"full_name\", obfuscated values are replaced with \"{full_name}\". For more information, see Slot Obfuscation ."
        },
        "defaultValueSpec": {
          "$ref": "#/$defs/SlotDefaultValueSpec"
        }
      },
      "required": [
        "name",
        "slotConstraint"
      ]
    },
    "ModelsLexSlotDefaultValue": {
      "type": "object",
      "properties": {
        "defaultValue": {
          "type": "string",
          "description": "The default value for the slot. You can specify one of the following: #context-name.slot-name - The slot value \"slot-name\" in the context \"context-name.\" {attribute} - The slot value of the session attribute \"attribute.\" 'value' - The discrete value \"value.\""
        }
      },
      "required": [
        "defaultValue"
      ]
    },
    "Prompt": {
      "type": "object",
      "properties": {
        "messages": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ModelsLexMessage"
          },
          "description": "An array of objects, each of which provides a message string and its type. You can specify the message string in plain text or in Speech Synthesis Markup Language (SSML)."
        },
        "maxAttempts": {
          "type": "integer",
          "description": "The number of times to prompt the user for information."
        },
        "responseCard": {
          "type": "string",
          "description": "A response card. Amazon Lex uses this prompt at runtime, in the PostText API response. It substitutes session attributes and slot values for placeholders in the response card. For more information, see ex-resp-card."
        }
      },
      "required": [
        "messages",
        "maxAttempts"
      ]
    },
    "SlotDefaultValueSpec": {
      "type": "object",
      "properties": {
        "defaultValueList": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ModelsLexSlotDefaultValue"
          },
          "description": "The default values for a slot. You can specify more than one default. For example, you can specify a default value to use from a matching context variable, a session attribute, or a fixed value. The default value chosen is selected based on the order that you specify them in the list. For example, if you specify a context variable and a fixed value in that order, Amazon Lex uses the context variable if it is available, else it uses the fixed value."
        }
      },
      "required": [
        "defaultValueList"
      ]
    },
    "Statement": {
      "type": "object",
      "properties": {
        "messages": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ModelsLexMessage"
          },
          "description": "A collection of message objects."
        },
        "responseCard": {
          "type": "string",
          "description": "At runtime, if the client is using the PostText API, Amazon Lex includes the response card in the response. It substitutes all of the session attributes and slot values for placeholders in the response card."
        }
      },
      "required": [
        "messages"
      ]
    }
  }
}