> 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 a Legacy Request

PATCH https://{tenant_name}.benchling.com/api/v2/requests/{request_id}
Content-Type: application/json

Update a Legacy Request

Reference: https://docs.benchling.com/docs/api/v2/benchling-api/legacy-requests/patch-request

## Authentication

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

## Request

### Path parameters

- `request_id` (string, required)

### Body (application/json)

This endpoint expects a RequestUpdate.

- `assignees` (list of RequestWriteBaseAssigneesItems, optional) — Array of assignees
- `fields` (map from string to Field, optional) — The Legacy Request's fields
- `projectId` (string, optional) — The ID of the project to which the Legacy Request belongs.
- `requestStatus` (enum, optional)
  - Allowed values: `REQUESTED`, `SCHEDULED`, `IN_PROGRESS`, `COMPLETED`, `CANCELLED`
- `requestorId` (string, optional, nullable) — ID of the user making the Legacy Request. If unspecified, the requestor is the request creator.
- `sampleGroups` (list of RequestSampleGroupCreate, optional)
- `scheduledOn` (date, optional) — Date the Legacy Request is scheduled to be executed on, in YYYY-MM-DD format.

## Response

### 200

OK

- `apiURL` (string, optional) — The canonical url of the Legacy Request in the API.
- `assignees` (list of RequestAssigneesItems, optional) — Array of assignees
- `createdAt` (string, optional) — Date and time the Legacy Request was created
- `creator` (RequestCreator, optional) — UserSummary of the user who created the Legacy Request
- `displayId` (string, optional) — User-friendly ID of the Legacy Request
- `fields` (map from string to Field, optional)
- `id` (string, optional) — Unique ID for the Legacy Request
- `projectId` (string, optional) — The ID of the project to which the Legacy Request belongs.
- `requestStatus` (enum, optional)
  - Allowed values: `REQUESTED`, `SCHEDULED`, `IN_PROGRESS`, `COMPLETED`, `CANCELLED`
- `requestor` (RequestRequestor, optional) — UserSummary of the user making the Legacy Request
- `sampleGroups` (list of RequestSampleGroup, optional)
- `scheduledOn` (date, optional, nullable) — Date the Legacy Request is scheduled to be executed on, in YYYY-MM-DD format.
- `schema` (RequestSchema, optional) — SchemaSummary for the Legacy Request
- `tasks` (list of RequestTask, optional)
- `webURL` (string, optional) — URL of the Legacy Request

## Errors

### 400 Bad Request Error

Bad Request

- `error` (BadRequestErrorError, optional)

## Types

### RequestWriteBaseAssigneesItems

### 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`

### RequestSampleGroupCreate

- `samples` (RequestSampleGroupSamples, required)

### RequestAssigneesItems

### RequestCreator

UserSummary of the user who created the Legacy Request

- `handle` (string, optional)
- `id` (string, optional)
- `name` (string, optional)

### RequestRequestor

UserSummary of the user making the Legacy Request

- `handle` (string, optional)
- `id` (string, optional)
- `name` (string, optional)

### RequestSampleGroup

- `id` (string, optional)
- `samples` (RequestSampleGroupSamples, optional)

### RequestSchema

- `archiveRecord` (ArchiveRecord, optional, nullable)
- `fieldDefinitions` (list of RequestSchemaFieldDefinitionsItems, optional)
- `id` (string, optional)
- `name` (string, optional)
- `type` (enum, optional)
  - Allowed values: `request`
- `modifiedAt` (datetime, optional) — DateTime the Legacy Request Schema was last modified
- `organization` (RequestSchemaOrganization, optional) — The organization that owns the schema.
- `systemName` (string, optional)

### RequestTask

A request task.

- `id` (string, required) — ID of the Legacy Request Task
- `fields` (map from string to Field, optional) — Schema fields to set on the request task. Every field should have its name as a key, mapping to an object with information about the value of the field.
- `sampleGroupIds` (list of string, optional) — IDs of all Legacy Request Sample Groups now associated with this task.
- `schema` (SchemaSummary, optional, nullable)

### BadRequestErrorError

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

### RequestWriteUserAssignee

- `userId` (string, required)

### RequestWriteTeamAssignee

- `teamId` (string, required)

### 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"])

### RequestSampleGroupSamples

### RequestUserAssignee

- `user` (UserSummary, optional)

### RequestTeamAssignee

- `team` (TeamSummary, optional)

### ArchiveRecord

- `reason` (string, optional)

### RequestSchemaFieldDefinitionsItems

### RequestSchemaOrganization

The organization that owns the schema.

- `handle` (string, optional)
- `id` (string, optional)
- `name` (string, optional)

### SchemaSummary

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

### RequestSampleWithEntity

- `entityId` (string, required)
- `containerId` (string, optional)

### RequestSampleWithBatch

- `batchId` (string, required)
- `containerId` (string, optional)

### UserSummary

- `handle` (string, optional)
- `id` (string, optional)
- `name` (string, optional)

### TeamSummary

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

### SimpleFieldDefinition

- `archiveRecord` (ArchiveRecord, optional, nullable)
- `id` (string, optional)
- `isMulti` (boolean, optional)
- `isRequired` (boolean, optional)
- `name` (string, optional)
- `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`

### IntegerFieldDefinition

- `archiveRecord` (ArchiveRecord, optional, nullable)
- `id` (string, optional)
- `isMulti` (boolean, optional)
- `isRequired` (boolean, optional)
- `name` (string, optional)
- `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`
- `numericMax` (double, optional, nullable)
- `numericMin` (double, optional, nullable)
- `unit` (UnitSummary, optional, nullable)

### FloatFieldDefinition

- `archiveRecord` (ArchiveRecord, optional, nullable)
- `id` (string, optional)
- `isMulti` (boolean, optional)
- `isRequired` (boolean, optional)
- `name` (string, optional)
- `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`
- `decimalPrecision` (double, optional, nullable)
- `legalTextDropdownId` (string, optional, nullable)
- `numericMax` (double, optional, nullable)
- `numericMin` (double, optional, nullable)
- `unit` (UnitSummary, optional, nullable)

### DropdownFieldDefinition

- `archiveRecord` (ArchiveRecord, optional, nullable)
- `id` (string, optional)
- `isMulti` (boolean, optional)
- `isRequired` (boolean, optional)
- `name` (string, optional)
- `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`
- `dropdownId` (string, optional, nullable)

### SchemaLinkFieldDefinition

- `archiveRecord` (ArchiveRecord, optional, nullable)
- `id` (string, optional)
- `isMulti` (boolean, optional)
- `isRequired` (boolean, optional)
- `name` (string, optional)
- `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`
- `schemaId` (string, optional, nullable)

### UnitSummary

- `id` (string, optional)
- `name` (string, optional)
- `symbol` (string, optional)
- `unitTypeId` (string, optional)

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "apiURL": "https://benchling.com/api/v2/requests/req_dnn2JtWq",
  "assignees": [
    {
      "user": {
        "handle": "string",
        "id": "string",
        "name": "string"
      }
    }
  ],
  "createdAt": {},
  "creator": {
    "handle": "string",
    "id": "string",
    "name": "string"
  },
  "displayId": "VP1",
  "fields": {},
  "id": "req_JekfeyVS",
  "projectId": "src_29pt8Ida",
  "requestStatus": "REQUESTED",
  "requestor": {
    "handle": "string",
    "id": "string",
    "name": "string"
  },
  "sampleGroups": [
    {
      "id": "sgrp_YJKtcWV",
      "samples": {
        "Batch Example": {
          "batchId": "bat_XK0UnLyk"
        },
        "Entity Example": {
          "containerId": "ctn_urUAEBq",
          "entityId": "seq_nDtxYEs"
        }
      }
    }
  ],
  "scheduledOn": {},
  "schema": {
    "id": "string",
    "name": "string"
  },
  "tasks": [
    {
      "id": "reqtsk_PFHQ8rmb",
      "fields": {},
      "sampleGroupIds": [
        "string"
      ],
      "schema": {
        "id": "string",
        "name": "string"
      }
    }
  ],
  "webURL": "https://benchling.com/requests/req_JekfeyVS"
}
```

**SDK Code**

```python
import requests

url = "https://{tenant_name}.benchling.com/api/v2/requests/request_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/requests/request_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);
}
```