> This page is for Developer Documentation.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.benchling.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.benchling.com/_mcp/server.

# Export Item

POST https://{tenant_name}.benchling.com/api/v2/exports
Content-Type: application/json

This endpoint launches a [long-running task](#/Tasks/getTask) and returns the Task ID of the launched task.
The task response contains a link to download the exported item from Amazon S3. The download is a ZIP file that contains the exported content in the requested format (PDF or HTML).
This endpoint is subject to throughput rate limiting. Due to the long running nature of these export requests, the endpoint may reject the request with an HTTP 429 error if the system is currently handling too many export requests simultaneously.
Note that the rate limit is not a fixed limit based on number of requests per hour, but rather a dynamic limit based on current system load and complexity of the items being exported. If using this endpoint with a large number of requests, it is recommended to implement a backoff and retry strategy to handle HTTP 429 errors.
In rare cases, attachments still being scanned for viruses are omitted from the export.


Reference: https://docs.benchling.com/docs/api/v2/benchling-api/exports/export-item

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Body (application/json)

This endpoint expects an ExportItemRequest.

- `id` (string, required) — ID of the item to export
- `format` (enum, optional, default: pdf) — The export format for the item. Defaults to pdf if not specified.
  - Allowed values: `pdf`, `html`

## Response

### 202

This endpoint launches a [long-running task](#/Tasks/getTask) and returns the Task ID of the launched task. The task response contains a link to download the exported item from Amazon S3. The download is a ZIP file that contains the exported content in the requested format (PDF or HTML).

- `taskId` (string, optional)

## Errors

### 400 Bad Request Error

Bad Request

- `error` (BadRequestErrorError, optional)

## Types

### BadRequestErrorError

- `message` (string, optional)
- `type` (enum, optional)
  - Allowed values: `invalid_request_error`
- `userMessage` (string, optional)

## Examples

**Request**

```json
{
  "id": "etr_1X1AlQPD"
}
```

**Response**

```json
{
  "taskId": "string"
}
```

**SDK Code**

```python
import requests

url = "https://{tenant_name}.benchling.com/api/v2/exports"

payload = { "id": "etr_1X1AlQPD" }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://{tenant_name}.benchling.com/api/v2/exports';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"id":"etr_1X1AlQPD"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```