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

PATCH https://{tenant_name}.benchling.com/api/v2-beta/worklists/{worklist_id}
Content-Type: application/json

Update a worklist

Reference: https://docs.benchling.com/docs/api/v2-beta/benchling-api-beta/worklists/update-worklist

## Authentication

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

## Request

### Path parameters

- `worklist_id` (string, required) — ID of the worklist

### Body (application/json)

This endpoint expects a WorklistUpdate.

- `name` (string, optional) — Name of the worklist
- `worklistItemIds` (list of string, optional) — An ordered set of IDs to assign as worklist items. IDs should reference existing items which fit the worklist's specific type. For instance, a worklist of type container should only have item IDs which represent containers. Replaces any existing worklist items with this set.

## Response

### 200

OK

- `apiURL` (string, optional) — The canonical url of the Worklist in the API.
- `createdAt` (datetime, optional) — Date and time the worklist was created
- `creator` (WorklistCreator, optional) — UserSummary of the user who created the worklist
- `id` (string, optional) — ID of the worklist
- `modifiedAt` (datetime, optional) — Date and time the worklist was last modified
- `name` (string, optional) — Name of the worklist
- `type` (enum, optional) — The type of items a worklist contains.
  - Allowed values: `batch`, `bioentity`, `container`, `plate`
- `worklistItems` (list of WorklistItemSummary, optional)

## Errors

### 400 Bad Request Error

Bad Request

- `error` (BadRequestErrorError, optional)

## Types

### WorklistCreator

UserSummary of the user who created the worklist

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

### WorklistItemSummary

A summary of an item in a worklist.

- `id` (string, optional) — ID of the item
- `name` (string, optional) — Name of the item

### BadRequestErrorError

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

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "apiURL": "https://benchling.com/api/v2-Beta/worklists/wk_dnn2JtWq",
  "createdAt": {},
  "creator": {
    "handle": "string",
    "id": "string",
    "name": "string"
  },
  "id": "string",
  "modifiedAt": {},
  "name": "string",
  "type": "batch",
  "worklistItems": [
    {
      "id": "string",
      "name": "string"
    }
  ]
}
```

**SDK Code**

```python
import requests

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