> 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 legacy workflow

PATCH https://{tenant_name}.benchling.com/api/v2/legacy-workflows/{legacy_workflow_id}
Content-Type: application/json

Update workflow metadata

Reference: https://docs.benchling.com/docs/api/v2/benchling-api/legacy-workflows/update-legacy-workflow-metadata

## Authentication

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

## Request

### Path parameters

- `legacy_workflow_id` (string, required) — ID of the legacy workflow to update

### Body (application/json)

This endpoint expects a LegacyWorkflowPatch.

- `description` (string, optional) — Description of the legacy workflow
- `name` (string, optional) — Name of the legacy workflow
- `projectId` (string, optional) — ID of the project that contains the legacy workflow

## Response

### 200

OK

- `createdAt` (datetime, optional) — DateTime at which the the legacy workflow was created
- `description` (string, optional, nullable) — Description of the legacy workflow
- `displayId` (string, optional) — User-friendly ID of the legacy workflow
- `id` (string, optional) — ID of the legacy workflow
- `name` (string, optional) — Name of the legacy workflow
- `projectId` (string, optional) — ID of the project that contains the legacy workflow

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "createdAt": "2024-01-15T09:30:00Z",
  "description": "string",
  "displayId": "string",
  "id": "wfw_uHBz7ka2",
  "name": "string",
  "projectId": "string"
}
```

**SDK Code**

```python
import requests

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