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

# Batch update Reaction

PATCH https://{tenant_name}.benchling.com/api/v3/reaction:batch-update
Content-Type: application/json

Batch update Reaction synchronously in one transaction. Maximum 25 items per request.

Reference: https://docs.benchling.com/docs/api/benchling-api/reaction/batchupdate

## Authentication

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

## Request

### Headers

- `EARLY-ACCESS` (string, optional) — Set to true to access beta operations via /api/v3.

### Body (application/json)

This endpoint expects an object.

- `items` (list of UpdateReactionInputWithPathParams, required)

## Response

### 200

OK

- `items` (list of Reaction, required)

## Errors

### 400 Reaction Batch Update Request Bad Request Error

Bad Request

- `detail` (GeneralErrorDetail, required, nullable)
- `instance` (string, required)
- `status` (integer, required)
- `title` (string, required, nullable)
- `type` (string, required)
- `invalidId` (string, optional)

### 403 Reaction Batch Update Request Forbidden Error

Forbidden

- `detail` (GeneralErrorDetail, required, nullable)
- `instance` (string, required)
- `status` (integer, required)
- `title` (string, required, nullable)
- `type` (string, required)
- `invalidId` (string, optional)

### 404 Reaction Batch Update Request Not Found Error

Not Found

- `detail` (GeneralErrorDetail, required, nullable)
- `instance` (string, required)
- `status` (integer, required)
- `title` (string, required, nullable)
- `type` (string, required)
- `invalidId` (string, optional)

### 409 Reaction Batch Update Request Conflict Error

Conflict

- `detail` (GeneralErrorDetail, required, nullable)
- `instance` (string, required)
- `status` (integer, required)
- `title` (string, required, nullable)
- `type` (string, required)
- `invalidId` (string, optional)

### 429 Reaction Batch Update Request Too Many Requests Error

Too Many Requests

- `detail` (TooManyRequestsErrorBodyDetail, required, nullable)
- `instance` (string, required)
- `status` (integer, required)
- `title` (string, required, nullable)
- `type` (string, required)
- `invalidId` (string, optional)
- `violated-policies` (list of enum, optional) — The budget policies that rejected the request, in canonical order: `user`, `integration`, then `tenant`.
  - Allowed values: `user`, `integration`, `tenant`

### 500 Reaction Batch Update Request Internal Server Error

Internal Server Error

- `detail` (InternalServerErrorBodyDetail, required, nullable)
- `instance` (string, required)
- `status` (integer, required)
- `title` (string, required, nullable)
- `type` (string, required)
- `errorId` (string, optional)

## Types

### UpdateReactionInputWithPathParams

- `id` (string, required)
- `archiveReason` (string, optional)
- `archived` (boolean, optional)

### Reaction

A Chemical Reaction is a process where molecules are transformed into new molecules.

- `__typename` (string, optional)
- `archiveReason` (string, optional, nullable)
- `archived` (boolean, optional)
- `authors` (string, optional, nullable)
- `components` (list of ReactionComponentsItem, optional)
- `createdAt` (string, optional, nullable)
- `creator` (PrincipalRef, optional)
- `entry` (EntryRef, optional, nullable)
- `folder` (FolderRef, optional)
- `id` (string, optional)
- `modifiedAt` (string, optional, nullable)
- `name` (string, optional)
- `webUrl` (string, optional)

### GeneralErrorDetail

### TooManyRequestsErrorBodyDetail

### InternalServerErrorBodyDetail

### ReactionComponentsItem

Union of StandardReactionComponent, ReactantComponent, ProductComponent

### PrincipalRef

- `__typename` (string, optional)
- `id` (string, optional)

### EntryRef

- `__typename` (string, optional)
- `id` (string, optional)

### FolderRef

- `__typename` (string, optional)
- `id` (string, optional)

### StandardReactionComponent

Generic type for most reaction components

- `__typename` (string, optional)
- `amountActual` (string, optional, nullable)
- `amountPlan` (string, optional, nullable)
- `amountUnit` (UnitRef, optional, nullable)
- `calculationBase` (enum, optional, nullable)
  - Allowed values: `MOL_EQUIVALENT`, `MOL_PLAN`, `AMOUNT_PLAN`
- `concentration` (string, optional, nullable)
- `concentrationUnit` (UnitRef, optional, nullable)
- `linkedLot` (CustomEntityRef, optional, nullable)
- `linkedMolecule` (StandardReactionComponentLinkedMolecule, optional, nullable) — Union of InternalLinkedMolecule, ExternalLinkedMolecule
- `molActual` (string, optional, nullable)
- `molEquivalent` (string, optional, nullable)
- `molPlan` (string, optional, nullable)
- `molUnit` (UnitRef, optional, nullable)
- `purity` (string, optional, nullable)
- `role` (enum, optional)
  - Allowed values: `REACTANT`, `PRODUCT`, `REAGENT`, `BYPRODUCT`, `SOLVENT`, `CATALYST`

### ReactantComponent

Reaction component sub-type for reactants

- `__typename` (string, optional)
- `amountActual` (string, optional, nullable)
- `amountPlan` (string, optional, nullable)
- `amountUnit` (UnitRef, optional, nullable)
- `calculationBase` (enum, optional)
  - Allowed values: `MOL_EQUIVALENT`, `MOL_PLAN`, `AMOUNT_PLAN`
- `concentration` (string, optional, nullable)
- `concentrationUnit` (UnitRef, optional, nullable)
- `isLimitingReactant` (boolean, optional)
- `linkedLot` (CustomEntityRef, optional, nullable)
- `linkedMolecule` (ReactantComponentLinkedMolecule, optional, nullable) — Union of InternalLinkedMolecule, ExternalLinkedMolecule
- `molActual` (string, optional, nullable)
- `molEquivalent` (string, optional, nullable)
- `molPlan` (string, optional, nullable)
- `molUnit` (UnitRef, optional, nullable)
- `purity` (string, optional, nullable)
- `role` (enum, optional)
  - Allowed values: `REACTANT`, `PRODUCT`, `REAGENT`, `BYPRODUCT`, `SOLVENT`, `CATALYST`

### ProductComponent

Reaction component sub-type for products

- `__typename` (string, optional)
- `amountActual` (string, optional, nullable)
- `amountPlan` (string, optional, nullable)
- `amountUnit` (UnitRef, optional, nullable)
- `amountYield` (string, optional, nullable)
- `calculationBase` (enum, optional)
  - Allowed values: `MOL_EQUIVALENT`, `MOL_PLAN`, `AMOUNT_PLAN`
- `concentration` (string, optional, nullable)
- `concentrationUnit` (UnitRef, optional, nullable)
- `linkedLot` (CustomEntityRef, optional, nullable)
- `linkedMolecule` (ProductComponentLinkedMolecule, optional, nullable) — Union of InternalLinkedMolecule, ExternalLinkedMolecule
- `molActual` (string, optional, nullable)
- `molEquivalent` (string, optional, nullable)
- `molPlan` (string, optional, nullable)
- `molUnit` (UnitRef, optional, nullable)
- `purity` (string, optional, nullable)
- `role` (enum, optional)
  - Allowed values: `REACTANT`, `PRODUCT`, `REAGENT`, `BYPRODUCT`, `SOLVENT`, `CATALYST`

### UnitRef

- `__typename` (string, optional)
- `id` (string, optional)

### CustomEntityRef

- `__typename` (string, optional)
- `id` (string, optional)

### StandardReactionComponentLinkedMolecule

### ReactantComponentLinkedMolecule

### ProductComponentLinkedMolecule

### InternalLinkedMolecule

Linked molecule from the Benchling registry (internal)

- `__typename` (string, optional)
- `molecularFormulaOverride` (string, optional, nullable)
- `molecularWeightOverride` (string, optional, nullable)
- `molecule` (MoleculeRef, optional)

### ExternalLinkedMolecule

Linked molecule from external registries/catalogs

- `__typename` (string, optional)
- `casId` (string, optional, nullable)
- `externalDbId` (string, optional, nullable)
- `externalDbName` (string, optional, nullable)
- `molecularFormula` (string, optional, nullable)
- `molecularFormulaOverride` (string, optional, nullable)
- `molecularWeight` (string, optional, nullable)
- `molecularWeightOverride` (string, optional, nullable)
- `smiles` (string, optional, nullable)

### MoleculeRef

- `__typename` (string, optional)
- `id` (string, optional)

## Examples

**Request**

```json
{
  "items": [
    {
      "id": "rxn_Xk9mLpQr",
      "archiveReason": "Made in error",
      "archived": true
    }
  ]
}
```

**Response**

```json
{
  "items": [
    {
      "__typename": "__typename",
      "archiveReason": "archiveReason",
      "archived": true,
      "authors": "authors",
      "components": [
        {}
      ],
      "createdAt": "createdAt",
      "id": "id",
      "modifiedAt": "modifiedAt",
      "name": "name",
      "webUrl": "webUrl"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://{tenant_name}.benchling.com/api/v3/reaction:batch-update"

payload = { "items": [
        {
            "id": "rxn_Xk9mLpQr",
            "archiveReason": "Made in error",
            "archived": True
        }
    ] }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://{tenant_name}.benchling.com/api/v3/reaction:batch-update';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"items":[{"id":"rxn_Xk9mLpQr","archiveReason":"Made in error","archived":true}]}'
};

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