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

PATCH https://{tenant_name}.benchling.com/api/v3/feature-library-item/{feature_library_item_id}
Content-Type: application/json

Update FeatureLibraryItem.

Reference: https://docs.benchling.com/docs/api/benchling-api/feature-library-item/update

## Authentication

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

## Request

### Path parameters

- `feature_library_item_id` (string, required) — ID of the FeatureLibraryItem.

### Body (application/json)

This endpoint expects an object.

- `color` (string, optional) — Must be a valid hex color string (for example, `#F58A5E`).
- `featureLibraryId` (string, optional) — New feature library id to contain this feature.
- `featureType` (string, optional, nullable) — The type of the Feature Library Item, like gene, promoter, etc. Note: This is an arbitrary string, not an enum
- `name` (string, optional) — Item names must be non-empty after trimming whitespace and at most 255 characters.
- `pattern` (string, optional) — Patterns must be non-empty and valid for the item's `matchType`. Nucleotide patterns accept IUPAC bases plus wildcards (`#`, `<`, `>`, `()`). Amino acid patterns accept standard residues plus the same wildcard characters. Patterns are compared case-insensitively within a library, so two items cannot differ only by letter case.

## Response

### 200

OK

- `__typename` (string, optional)
- `color` (string, optional) — The color of the annotations generated by the Feature Library Item. Must be a valid hex string
- `createdAt` (string, optional) — DateTime the Feature Library Item was created
- `featureLibrary` (FeatureLibraryRef, optional) — The Feature Library the Feature Library Item belongs to
- `featureType` (string, optional, nullable) — The type of the Feature Library Item, like gene, promoter, etc. Note: This is an arbitrary string, not an enum
- `id` (string, optional)
- `matchType` (enum, optional) — The match type of the Feature Library Item. Used to determine how auto-annotate matches are made
  - Allowed values: `NUCLEOTIDE`, `AA_SEQUENCE`
- `modifiedAt` (string, optional) — DateTime the Feature Library Item was last modified
- `name` (string, optional) — The name of the Feature Library Item
- `pattern` (string, optional) — The pattern used for matching during auto-annotation

## Errors

### 400 Feature Library Item 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 Feature Library Item 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 Feature Library Item 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 Feature Library Item 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 Feature Library Item 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 Feature Library Item 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

### FeatureLibraryRef

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

### GeneralErrorDetail

### TooManyRequestsErrorBodyDetail

### InternalServerErrorBodyDetail

## Examples

**Request**

```json
{
  "color": "#4ECDC4",
  "name": "T7 promoter (strong)",
  "pattern": "TAATACGACTCACTATAGGGA"
}
```

**Response**

```json
{
  "__typename": "__typename",
  "color": "color",
  "createdAt": "createdAt",
  "featureLibrary": {
    "__typename": "__typename",
    "id": "id"
  },
  "featureType": "featureType",
  "id": "id",
  "matchType": "NUCLEOTIDE",
  "modifiedAt": "modifiedAt",
  "name": "name",
  "pattern": "pattern"
}
```

**SDK Code**

```python
import requests

url = "https://{tenant_name}.benchling.com/api/v3/feature-library-item/feature_library_item_id"

payload = {
    "color": "#4ECDC4",
    "name": "T7 promoter (strong)",
    "pattern": "TAATACGACTCACTATAGGGA"
}
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/feature-library-item/feature_library_item_id';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"color":"#4ECDC4","name":"T7 promoter (strong)","pattern":"TAATACGACTCACTATAGGGA"}'
};

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