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

# Update an Automation Input Generator

PATCH https://{tenant_name}.benchling.com/api/v2/automation-input-generators/{input_generator_id}
Content-Type: application/json

Update an Automation Input Generator

Reference: https://docs.benchling.com/docs/api/v2/benchling-api/lab-automation/update-automation-input-generator

## Authentication

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

## Request

### Path parameters

- `input_generator_id` (string, required)

### Body (application/json)

This endpoint expects an AutomationInputGeneratorUpdate.

- `fileId` (string, optional, nullable) — The ID of the file (blob) associated with the input generator. Set to `null` to remove an existing file from the generator.

## Response

### 200

OK

- `assayRunId` (string, optional)
- `automationFileConfig` (AutomationInputGeneratorAutomationFileConfig, optional)
- `file` (Blob, optional, nullable)
- `id` (string, optional)
- `status` (enum, optional)
  - Allowed values: `SUCCEEDED`, `FAILED`, `NOT_STARTED`, `RUNNING`
- `apiURL` (string, optional) — The canonical url of the Automation Input Generator in the API.
- `createdAt` (datetime, optional) — DateTime the Automation Input Generator was last modified
- `modifiedAt` (datetime, optional) — DateTime the Automation Input Generator was last modified
- `transforms` (list of LabAutomationTransform, optional)

## Errors

### 400 Bad Request Error

Bad Request

- `error` (BadRequestErrorError, optional)

## Types

### AutomationInputGeneratorAutomationFileConfig

- `name` (string, optional)

### Blob

- `id` (string, optional) — The universally unique identifier (UUID) for the blob.
- `mimeType` (string, optional) — eg. application/jpeg
- `name` (string, optional) — Name of the blob
- `type` (enum, optional) — One of RAW_FILE or VISUALIZATION. If VISUALIZATION, the blob may be displayed as an image preview.
  - Allowed values: `RAW_FILE`, `VISUALIZATION`
- `uploadStatus` (enum, optional)
  - Allowed values: `IN_PROGRESS`, `COMPLETE`, `ABORTED`

### LabAutomationTransform

- `apiURL` (string, optional) — The canonical url of the transform in the API.
- `blobId` (string, optional, nullable)
- `customTransformId` (string, optional, nullable)
- `errors` (LabAutomationBenchlingAppErrors, optional)
- `id` (string, optional)
- `inputGeneratorId` (string, optional, nullable)
- `modifiedAt` (datetime, optional) — DateTime the transform was last modified.
- `outputProcessorId` (string, optional, nullable)
- `status` (enum, optional)
  - Allowed values: `NOT_STARTED`, `RUNNING`, `FAILED`, `SUCCEEDED`

### BadRequestErrorError

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

### LabAutomationBenchlingAppErrors

- `topLevelErrors` (list of LabAutomationBenchlingAppErrorsTopLevelErrorsItems, optional)

### LabAutomationBenchlingAppErrorsTopLevelErrorsItems

- `errorMessage` (string, optional)

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "assayRunId": "588aca02-1a20-4b94-a40f-b3f3a0081749",
  "automationFileConfig": {
    "name": "MyInstrumentName"
  },
  "file": {
    "id": "c33fe52d-fe6a-4c98-adcd-211bdf6778f7",
    "mimeType": "text/csv",
    "name": "MyInstrumentInputFile.csv",
    "type": "RAW_FILE",
    "uploadStatus": "IN_PROGRESS"
  },
  "id": "aif_C3wGA9HF",
  "status": "SUCCEEDED",
  "apiURL": "https://benchling.com/api/v2/automation-input-generators/aif_C3wGA9HF",
  "createdAt": "2024-01-15T09:30:00Z",
  "modifiedAt": "2024-01-15T09:30:00Z",
  "transforms": [
    {
      "apiURL": "string",
      "blobId": "string",
      "customTransformId": "string",
      "errors": {
        "topLevelErrors": [
          {
            "errorMessage": "string"
          }
        ]
      },
      "id": "string",
      "inputGeneratorId": "string",
      "modifiedAt": "2024-01-15T09:30:00Z",
      "outputProcessorId": "string",
      "status": "NOT_STARTED"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://{tenant_name}.benchling.com/api/v2/automation-input-generators/input_generator_id"

payload = {}
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/v2/automation-input-generators/input_generator_id';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

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