v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1457652.1 KB

Creates a new session or modifies an existing session with an Amazon Lex V2 bot. Use this operation to enable your application to set the state of the bot.

post/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}

Path parameters

botIdstring required

The identifier of the bot that receives the session data.

botAliasIdstring required

The alias identifier of the bot that receives the session data.

localeIdstring required

The locale where the session is in use.

sessionIdstring required

The identifier of the session that receives the session data.

Headers

ResponseContentTypestring
<p>The message that Amazon Lex V2 returns in the response can be either text or speech depending on the value of this parameter. </p> <ul> <li> <p>If the value is <code>text/plain; charset=utf-8</code>, Amazon Lex V2 returns text in the response.</p> </li> </ul>

Request body

requestAttributesobject
<p>Request-specific information passed between Amazon Lex V2 and the client application.</p> <p>The namespace <code>x-amz-lex:</code> is reserved for special attributes. Don't create any request attributes with the prefix <code>x-amz-lex:</code>.</p>

Response

Success

audioStreamstring

If the requested content type was audio, the audio version of the message to convey to the user.