> 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.

# Bulk update containers

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

Bulk update containers

Reference: https://docs.benchling.com/docs/api/v2/benchling-api/containers/bulk-update-containers

## 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 a ContainersBulkUpdateRequest.

- `containers` (list of ContainerBulkUpdateItem, required)

## Response

### 202

This endpoint launches a [long-running task](#/Tasks/getTask) and returns the Task ID of the launched task. The task response contains the full list of Containers that were updated.

- `taskId` (string, optional)

## Errors

### 400 Bad Request Error

Bad Request

- `error` (BadRequestErrorError, optional)

## Types

### ContainerBulkUpdateItem

- `containerId` (string, required)
- `fields` (map from string to Field, optional)
- `name` (string, optional)
- `parentStorageId` (string, optional) — ID of containing parent inventory, can also specify a coordinate for plates and boxes (e.g. plt_2bAks9dx:a2).
- `restrictedSamplePartyIds` (list of string, optional) — IDs of users or teams who have access to use a restricted container. Well plate wells and unrestricted containers do not have restricted sample parties.
- `restrictionStatus` (enum, optional) — Either RESTRICTED or UNRESTRICTED. This only applies to stand-alone containers (Plate wells are always set to NOT_APPLICABLE).
  - Allowed values: `RESTRICTED`, `UNRESTRICTED`, `NOT_APPLICABLE`
- `sampleOwnerIds` (list of string, optional) — IDs of users or teams who are sample owners for the container. Well plate wells do not have sample owners.
- `concentration` (Measurement, optional) — Concentration for the container. Only valid for single content containers. Null values will be ignored.
- `quantity` (ContainerQuantity, optional) — Quantity of a container, well, or transfer. Supports mass, volume, and other quantities.
- `role` (ExperimentalWellRole, optional, nullable) — Role of a well in a well plate.
- `volume` (DeprecatedContainerVolumeForInput, optional) — Desired volume for a container, well, or transfer. "volume" type keys are deprecated in API requests; use the more permissive "quantity" type key instead.

### BadRequestErrorError

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

### Field

- `value` (FieldValue, required, nullable) — For single link fields, use the id of the item you want to link (eg. "seq_jdf8BV24"). For multi-link fields, use an array of ids of the items you want to link (eg. ["seq_jdf8BV24"])
- `displayValue` (string, optional, nullable)
- `isMulti` (boolean, optional)
- `textValue` (string, optional, nullable)
- `type` (enum, optional)
  - Allowed values: `dna_sequence_link`, `aa_sequence_link`, `custom_entity_link`, `entity_link`, `mixture_link`, `molecule_link`, `dropdown`, `part_link`, `translation_link`, `aa_part_link`, `base_molecule_link`, `blob_link`, `text`, `long_text`, `batch_link`, `storage_link`, `entry_link`, `assay_request_link`, `assay_result_link`, `assay_run_link`, `boolean`, `float`, `integer`, `datetime`, `date`, `json`

### Measurement

- `units` (string, required, nullable) — Can only be null if value is also null
- `value` (double, required, nullable) — Can only be null if units is also null

### ContainerQuantity

Quantity of a container, well, or transfer. Supports mass, volume, and other quantities.

- `units` (enum, optional, nullable)
  - Allowed values: `L`, `mL`, `uL`, `nL`, `pL`, `gal (US)`, `qt (US)`, `pt (US)`, `kg`, `g`, `mg`, `ug`, `ng`, `pg`, `lb`, `oz`, `mol`, `mmol`, `umol`, `nmol`, `pmol`, `cells`, `(x10^3) cells`, `(x10^4) cells`, `(x10^5) cells`, `(x10^6) cells`, `(x10^7) cells`, `(x10^8) cells`, `(x10^9) cells`, `items`, `units`
- `value` (double, optional, nullable)

### ExperimentalWellRole

- `group` (integer, optional)
- `primaryRole` (enum, optional)
  - Allowed values: `SAMPLE`, `CONTROL`, `STANDARD`, `BLANK`
- `subrole` (string, optional, nullable)

### DeprecatedContainerVolumeForInput

Desired volume for a container, well, or transfer. "volume" type keys are deprecated in API requests; use the more permissive "quantity" type key instead.

- `units` (enum, optional, nullable)
  - Allowed values: `pL`, `nL`, `uL`, `mL`, `L`
- `value` (double, optional, nullable)

### FieldValue

For single link fields, use the id of the item you want to link (eg. "seq_jdf8BV24"). For multi-link fields, use an array of ids of the items you want to link (eg. ["seq_jdf8BV24"])

## Examples

**Request**

```json
{
  "containers": [
    {
      "containerId": "string"
    }
  ]
}
```

**Response**

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

**SDK Code**

```python
import requests

url = "https://{tenant_name}.benchling.com/api/v2/containers:bulk-update"

payload = { "containers": [{ "containerId": "string" }] }
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/containers:bulk-update';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"containers":[{"containerId":"string"}]}'
};

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