Menu
Amazon Lex
Developer Guide

DeleteUtterances

Deletes stored utterances.

Amazon Lex stores the utterances that users send to your bot unless the childDirected field in the bot is set to true. Utterances are stored for 15 days for use with the GetUtterancesView operation, and then stored indefinately for use in improving the ability of your bot to respond to user input.

Use the DeleteStoredUtterances operation to manually delete stored utterances for a specific user.

This operation requires permissions for the lex:DeleteUtterances action.

Request Syntax

Copy
DELETE /bots/botName/utterances/userId HTTP/1.1

URI Request Parameters

The request requires the following URI parameters.

botName

The name of the bot that stored the utterances.

Length Constraints: Minimum length of 2. Maximum length of 50.

Pattern: ^[a-zA-Z]+((_[a-zA-Z]+)*|([a-zA-Z]+_)*|_)

userId

The unique identifier for the user that made the utterances. This is the user ID that was sent in the PostContent or PostText operation request that contained the utterance.

Length Constraints: Minimum length of 2. Maximum length of 100.

Request Body

The request does not have a request body.

Response Syntax

Copy
HTTP/1.1 204

Response Elements

If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body.

Errors

BadRequestException

The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and try again.

HTTP Status Code: 400

InternalFailureException

An internal Amazon Lex error occurred. Try your request again.

HTTP Status Code: 500

LimitExceededException

The request exceeded a limit. Try your request again.

HTTP Status Code: 429

NotFoundException

The resource specified in the request was not found. Check the resource and try again.

HTTP Status Code: 404

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: