> 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 user by ID

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

Update a single user.

Reference: https://docs.benchling.com/docs/api/v2/benchling-api/users/update-user

## Authentication

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

## Request

### Path parameters

- `user_id` (string, required) — ID of user to update

### Body (application/json)

This endpoint expects an UserUpdate.

- `email` (string, optional) — Email of the User
- `handle` (string, optional) — Handle of the User
- `isSuspended` (boolean, optional) — Suspended status of the User
- `name` (string, optional) — Name of the User

## Response

### 200

OK

- `handle` (string, optional)
- `id` (string, optional)
- `name` (string, optional)
- `apiKeyLastChangedAt` (string, optional, nullable)
- `email` (string, optional)
- `isSuspended` (boolean, optional)
- `passwordLastChangedAt` (string, optional, nullable)

## Errors

### 400 Bad Request Error

Bad Request

- `error` (BadRequestErrorError, optional)

### 403 Forbidden Error

Forbidden

- `error` (ForbiddenErrorError, optional)

### 404 Not Found Error

Not Found

- `error` (NotFoundErrorError, optional)

## Types

### BadRequestErrorError

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

### ForbiddenErrorError

- `invalidId` (string, optional)
- `message` (string, optional)
- `type` (string, optional)
- `userMessage` (string, optional)

### NotFoundErrorError

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

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "handle": "string",
  "id": "string",
  "name": "string",
  "apiKeyLastChangedAt": "string",
  "email": "string",
  "isSuspended": true,
  "passwordLastChangedAt": "string"
}
```

**SDK Code**

```python
import requests

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