---
title: "POST /bots/{botId}/botversions/"
method: POST
path: "/bots/{botId}/botversions/"
---

# POST /bots/{botId}/botversions/

`POST /bots/{botId}/botversions/`

Gets information about all of the versions of a bot.

The `ListBotVersions` operation returns a summary of each version of a bot. For example, if a bot has three numbered versions, the `ListBotVersions` operation returns for summaries, one for each numbered version and one for the `DRAFT` version.

The `ListBotVersions` operation always returns at least one version, the `DRAFT` version.

## Path parameters

- `botId` string, required

## Request body

- object
  - `sortBy` object — Specifies attributes for sorting a list of bot versions.
    - `attribute` 'BotVersion' — The attribute to use to sort the list of versions.
    - `order` 'Ascending' | 'Descending' — The order to sort the list. You can specify ascending or descending order.
  - `maxResults` integer — The maximum number of versions to return in each page of results. If there are fewer results than the max page size, only the actual number of results are returned.
  - `nextToken` string — If the response to the <code>ListBotVersion</code> operation contains more results than specified in the <code>maxResults</code> parameter, a token is returned in the response. Use that token in the <code>nextToken</code> parameter to return the next page of results.

## Response `200`

Success

- ListBotVersionsResponse
  - `botId` string — The identifier of the bot to list versions for.
  - `botVersionSummaries` BotVersionSummary[] — Summary information for the bot versions that meet the filter criteria specified in the request. The length of the list is specified in the <code>maxResults</code> parameter of the request. If there are more versions available, the <code>nextToken</code> field contains a token to get the next page of results.
    - `botName` string — The name of the bot associated with the version.
    - `botVersion` string — The numeric version of the bot, or <code>DRAFT</code> to indicate that this is the version of the bot that can be updated..
    - `description` string — The description of the version.
    - `botStatus` 'Creating' | 'Available' | 'Inactive' | 'Deleting' | 'Failed' | 'Versioning' | 'Importing' | 'Updating' — The status of the bot. When the status is available, the version of the bot is ready for use.
    - `creationDateTime` string, date-time — A timestamp of the date and time that the version was created.
  - `nextToken` string — A token that indicates whether there are more results to return in a response to the <code>ListBotVersions</code> operation. If the <code>nextToken</code> field is present, you send the contents as the <code>nextToken</code> parameter of a <code>ListBotAliases</code> operation request to get the next page of results.

## Other responses

- `480` — ThrottlingException
- `481` — ServiceQuotaExceededException
- `482` — ValidationException
- `483` — InternalServerException

---

[API](https://skmtc.net/aws/apis/lexv2-models.md) · [All operations](https://skmtc.net/aws/apis/lexv2-models/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/lexv2-models/versions/6997ba482d72/schema)
