> 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 Create mixtures

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

Create multiple mixtures. Limit of 1000 mixtures per request.
To create new child mixtures (eg. a prep) from parent mixtures (eg. a recipe), set the parent mixture field and specify the desired final state for your ingredients.
Benchling will recognize that any ingredients you specify that match ingredients on the parent mixtures (based on component entity) are inherited. This can be seen on the returned `ingredients[i].hasParent` attribute.


Reference: https://docs.benchling.com/docs/api/v2/benchling-api/mixtures/bulk-create-mixtures

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

- `mixtures` (list of MixtureCreate, 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 mixtures that were created.

- `taskId` (string, optional)

## Errors

### 400 Bad Request Error

Bad Request

- `error` (BadRequestErrorError, optional)

## Types

### MixtureCreate

- `aliases` (list of string, optional) — Aliases to add to the mixture
- `amount` (string, optional) — The positive numerical amount value of this mixture in string format (to preserve full precision). Pair with `units`. Supports scientific notation (1.23e4).
- `authorIds` (list of string, optional) — IDs of users to set as the mixture's authors.
- `customFields` (map from string to CustomField, optional) — Custom fields to add to the mixture. Every field should have its name as a key, mapping to an object with information about the value of the field.
- `entityRegistryId` (string, optional)
- `fields` (map from string to Field, optional) — Schema fields to set on the mixture. Must correspond with the schema's field definitions. Every field should have its name as a key, mapping to an object with information about the value of the field. If you are setting the parent mixture field here, you must also specify `ingredients`
- `folderId` (string, optional) — ID of the folder that the entity is moved into
- `ingredients` (list of IngredientWriteParams, optional) — Desired final state for the ingredients on this mixture. Each ingredient you specify will be matched with the existing ingredients on the mixture based on the component entity, and Benchling will create, update, or delete this mixture's ingredients so that the final state of this mixture's ingredients matches your request. Benchling will recognize that any ingredients you specify that match ingredients on the parent mixture (based on component entity) are inherited. This can be seen on the returned `ingredients[i].hasParent` attribute.
- `name` (string, optional)
- `namingStrategy` (enum, optional) — Specifies the behavior for automatically generated names when registering an entity. - NEW_IDS: Generate new registry IDs - IDS_FROM_NAMES: Generate registry IDs based on entity names - DELETE_NAMES: Generate new registry IDs and replace name with registry ID - SET_FROM_NAME_PARTS: Generate new registry IDs, rename according to name template, and keep old name as alias - REPLACE_NAMES_FROM_PARTS: Generate new registry IDs, and replace name according to name template - KEEP_NAMES: Keep existing entity names as registry IDs - REPLACE_ID_AND_NAME_FROM_PARTS: Generate registry IDs and names according to name template
  - Allowed values: `NEW_IDS`, `IDS_FROM_NAMES`, `DELETE_NAMES`, `SET_FROM_NAME_PARTS`, `REPLACE_NAMES_FROM_PARTS`, `KEEP_NAMES`, `REPLACE_ID_AND_NAME_FROM_PARTS`
- `registryId` (string, optional) — Registry ID into which entity should be registered. this is the ID of the registry which was configured for a particular organization To get available registryIds, use the [/registries endpoint](#/Registry/listRegistries) Required in order for entities to be created directly in the registry.
- `schemaId` (string, optional)
- `units` (enum, optional)
  - Allowed values: `nL`, `uL`, `mL`, `L`, `g`, `kg`, `mg`, `ug`, `Units`

### BadRequestErrorError

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

### CustomField

- `value` (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`

### IngredientWriteParams

- `amount` (string, required, nullable) — The amount value of this ingredient in its mixture, in string format (to preserve full precision). Pair with `units`. Supports scientific notation (1.23e4). One ingredient on this mixture can have an amount value of `"QS"`.
- `catalogIdentifier` (string, required, nullable)
- `componentEntityId` (string, required) — The entity that uniquely identifies this component.
- `componentLotContainerId` (string, required, nullable) — The container representing the component lot for this ingredient. This is only writable if the mixture schema supports component lots in "inventory" format.
- `componentLotEntityId` (string, required, nullable) — The entity representing the component lot for this ingredient. This is only writable if the mixture schema supports component lots in "inventory" format.
- `componentLotText` (string, required, nullable) — Text representing the component lot for this ingredient. This is only writable if the mixture schema supports component lots in "text" format.
- `notes` (string, required, nullable)
- `units` (enum, required)
  - Allowed values: `nL`, `uL`, `mL`, `L`, `mg`, `g`, `kg`, `ug`, `Units`, `Cells`, `mol`, `mmol`, `umol`

### 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
{
  "mixtures": [
    {
      "ingredients": [
        {
          "amount": "12",
          "catalogIdentifier": "DION_004",
          "componentEntityId": "bfi_37hdg8",
          "componentLotContainerId": "cnt_12345",
          "componentLotEntityId": "bfi_12345",
          "componentLotText": "DION_004-source_001",
          "notes": "string",
          "units": "mL"
        }
      ],
      "name": "string",
      "schemaId": "string",
      "units": "L"
    }
  ]
}
```

**Response**

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

**SDK Code**

```python
import requests

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

payload = { "mixtures": [
        {
            "ingredients": [
                {
                    "amount": "12",
                    "catalogIdentifier": "DION_004",
                    "componentEntityId": "bfi_37hdg8",
                    "componentLotContainerId": "cnt_12345",
                    "componentLotEntityId": "bfi_12345",
                    "componentLotText": "DION_004-source_001",
                    "notes": "string",
                    "units": "mL"
                }
            ],
            "name": "string",
            "schemaId": "string",
            "units": "L"
        }
    ] }
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/mixtures:bulk-create';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"mixtures":[{"ingredients":[{"amount":"12","catalogIdentifier":"DION_004","componentEntityId":"bfi_37hdg8","componentLotContainerId":"cnt_12345","componentLotEntityId":"bfi_12345","componentLotText":"DION_004-source_001","notes":"string","units":"mL"}],"name":"string","schemaId":"string","units":"L"}]}'
};

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