---
title: "PUT /exports/"
method: PUT
path: "/exports/"
---

# PUT /exports/

`PUT /exports/`

Creates a zip archive containing the contents of a bot or a bot locale. The archive contains a directory structure that contains JSON files that define the bot.

You can create an archive that contains the complete definition of a bot, or you can specify that the archive contain only the definition of a single bot locale.

For more information about exporting bots, and about the structure of the export archive, see [Importing and exporting bots](https://docs.aws.amazon.com/lexv2/latest/dg/importing-exporting.html)

## Request body

- object
  - `resourceSpecification` object, required — Provides information about the bot or bot locale that you want to export. You can specify the <code>botExportSpecification</code> or the <code>botLocaleExportSpecification</code>, but not both.
    - `botExportSpecification` object — Parameters for exporting a bot.
      - `botId` string, required — The identifier of the bot assigned by Amazon Lex.
      - `botVersion` string, required — The version of the bot that was exported. This will be either <code>DRAFT</code> or the version number.
    - `botLocaleExportSpecification` object — Parameters for exporting a bot locale.
      - `botId` string, required — The identifier of the bot to create the locale for.
      - `botVersion` string, required — The version of the bot to export.
      - `localeId` string, required — The identifier of the language and locale to export. The string must match one of the locales in the bot.
    - `customVocabularyExportSpecification` object — The parameters required to export a custom vocabulary.
      - `botId` string, required — The identifier of the bot that contains the custom vocabulary to export.
      - `botVersion` string, required — The version of the bot that contains the custom vocabulary to export.
      - `localeId` string, required — The locale of the bot that contains the custom vocabulary to export.
    - `testSetExportSpecification` object — Specifications for the test set that is exported as a resource.
      - `testSetId` string, required — The unique identifier of the test set.
  - `fileFormat` 'LexJson' | 'TSV' | 'CSV', required — The file format of the bot or bot locale definition files.
  - `filePassword` string, password — An password to use to encrypt the exported archive. Using a password is optional, but you should encrypt the archive to protect the data in transit between Amazon Lex and your local computer.

## Response `202`

Success

- CreateExportResponse
  - `exportId` string — An identifier for a specific request to create an export.
  - `resourceSpecification` object — A description of the type of resource that was exported, either a bot or a bot locale.
    - `botExportSpecification` object — Parameters for exporting a bot.
      - `botId` string, required — The identifier of the bot assigned by Amazon Lex.
      - `botVersion` string, required — The version of the bot that was exported. This will be either <code>DRAFT</code> or the version number.
    - `botLocaleExportSpecification` object — Parameters for exporting a bot locale.
      - `botId` string, required — The identifier of the bot to create the locale for.
      - `botVersion` string, required — The version of the bot to export.
      - `localeId` string, required — The identifier of the language and locale to export. The string must match one of the locales in the bot.
    - `customVocabularyExportSpecification` object — The parameters required to export a custom vocabulary.
      - `botId` string, required — The identifier of the bot that contains the custom vocabulary to export.
      - `botVersion` string, required — The version of the bot that contains the custom vocabulary to export.
      - `localeId` string, required — The locale of the bot that contains the custom vocabulary to export.
    - `testSetExportSpecification` object — Specifications for the test set that is exported as a resource.
      - `testSetId` string, required — The unique identifier of the test set.
  - `fileFormat` 'LexJson' | 'TSV' | 'CSV' — The file format used for the bot or bot locale definition files.
  - `exportStatus` 'InProgress' | 'Completed' | 'Failed' | 'Deleting' — The status of the export. When the status is <code>Completed</code>, you can use the <a href="https://docs.aws.amazon.com/lexv2/latest/APIReference/API_DescribeExport.html">DescribeExport</a> operation to get the pre-signed S3 URL link to your exported bot or bot locale.
  - `creationDateTime` string, date-time — The date and time that the request to export a bot was created.

## Other responses

- `480` — ThrottlingException
- `481` — ServiceQuotaExceededException
- `482` — ValidationException
- `483` — ResourceNotFoundException
- `484` — ConflictException
- `485` — 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)
