{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-lex/json-schema/amazon-lex-post-text-request-schema.json",
  "title": "PostTextRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-lex-operations-api-openapi.yml#/components/schemas/PostTextRequest",
  "type": "object",
  "properties": {
    "botName": {
      "type": "string",
      "description": "The name of the Amazon Lex bot."
    },
    "botAlias": {
      "type": "string",
      "description": "The alias of the Amazon Lex bot."
    },
    "userId": {
      "type": "string",
      "description": "The ID of the client application user. Amazon Lex uses this to identify a user's conversation with your bot. At runtime, each request must contain the userID field. To decide the user ID to use for your application, consider the following factors. The userID field must not contain any personally identifiable information of the user, for example, name, personal identification numbers, or other end user personal information. If you want a user to start a conversation on one device and continue on another device, use a user-specific identifier. If you want the same user to be able to have two ind"
    },
    "sessionAttributes": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Application-specific information passed between Amazon Lex and a client application. For more information, see Setting Session Attributes."
    },
    "requestAttributes": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Request-specific information passed between Amazon Lex and a client application. The namespace x-amz-lex: is reserved for special attributes. Don't create any request attributes with the prefix x-amz-lex:. For more information, see Setting Request Attributes."
    },
    "inputText": {
      "type": "string",
      "description": "The text that the user entered (Amazon Lex interprets this text)."
    },
    "activeContexts": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/RuntimeLexActiveContext"
      },
      "description": "A list of contexts active for the request. A context can be activated when a previous intent is fulfilled, or by including the context in the request, If you don't specify a list of contexts, Amazon Lex will use the current list of contexts for the session. If you specify an empty list, all contexts for the session are cleared."
    }
  },
  "required": [
    "botName",
    "botAlias",
    "userId",
    "inputText"
  ],
  "$defs": {
    "RuntimeLexActiveContext": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the context."
        },
        "timeToLive": {
          "$ref": "#/$defs/RuntimeLexActiveContextTimeToLive"
        },
        "parameters": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "State variables for the current context. You can use these values as default values for slots in subsequent events."
        }
      },
      "required": [
        "name",
        "timeToLive",
        "parameters"
      ]
    },
    "RuntimeLexActiveContextTimeToLive": {
      "type": "object",
      "properties": {
        "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."
        }
      }
    }
  }
}