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

# Batch update GroupMembership

PATCH https://{tenant_name}.benchling.com/api/v3/group-membership:batch-update
Content-Type: application/json

Batch update GroupMembership synchronously in one transaction. Maximum 25 items per request.

Reference: https://docs.benchling.com/docs/api/benchling-api/group-membership/batchupdate

## Authentication

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

## Request

### Headers

- `EARLY-ACCESS` (string, optional) — Set to true to access beta operations via /api/v3.

### Body (application/json)

This endpoint expects an object.

- `items` (list of UpdateGroupMembershipInputWithPathParams, required)

## Response

### 200

OK

- `items` (list of GroupMembership, required)

## Errors

### 400 Group Membership Batch 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 Group Membership Batch 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 Group Membership Batch 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 Group Membership Batch 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 Group Membership Batch 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)

### 500 Group Membership Batch 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

### UpdateGroupMembershipInputWithPathParams

- `id` (string, required)
- `role` (enum, optional)
  - Allowed values: `MEMBER`, `ADMIN`

### GroupMembership

Indicates that a Principal is a member of Group. Role indicates that the Principal is a member of a subgroup, such as Admins of the Group. Teams are the canonical example of a Group.

- `__typename` (string, optional)
- `createdAt` (string, optional)
- `group` (Group, optional)
- `id` (string, optional)
- `member` (PrincipalRef, optional)
- `modifiedAt` (string, optional)
- `role` (enum, optional)
  - Allowed values: `MEMBER`, `ADMIN`

### GeneralErrorDetail

### TooManyRequestsErrorBodyDetail

### InternalServerErrorBodyDetail

### Group

### PrincipalRef

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

### Organization

Represents a group of users within Benchling, typically corresponding to a company, department, or research group. Organizations provide a many-to-many relationship between users—each user can belong to multiple organizations, and each organization can have multiple users. Users are designated as either ADMIN (with management privileges) or MEMBER within the organization via `GroupMembership`. Organizations can own resources like Projects and Folders, and can contain Teams for finer-grained user grouping. Organizations also control access settings such as whether members can create personal ownables and what default policies apply to new resources. In the UI, organizations appear in user profiles and are used for sharing and access control throughout Benchling.

- `__typename` (string, optional)
- `createdAt` (string, optional)
- `handle` (string, optional)
- `id` (string, optional)
- `memberships` (string, optional)
- `modifiedAt` (string, optional)
- `name` (string, optional, nullable)

### Team

Represents a subgroup of users within an `Organization`, enabling finer-grained user management and data sharing. Teams belong to exactly one organization, and users may only join a team if they are already members of that team's parent organization. Each team member has either ADMIN or MEMBER role (see `GroupMembership`): admins can manage team membership, while members receive standard access. Unlike Organizations, teams cannot directly own Projects or Folders—they are used for collaboration and access control purposes. Teams can be configured with `provisionedCapabilities` to grant specific Benchling capabilities to members upon joining. The `membersAreAdministratorsOfSchemas` flag controls whether team members can create and update automation, result, and request schemas.

- `__typename` (string, optional)
- `createdAt` (string, optional)
- `description` (string, optional)
- `id` (string, optional)
- `membersAreAdministratorsOfSchemas` (boolean, optional) — Team members can create and update automation, result, and request schemas.
- `memberships` (string, optional)
- `modifiedAt` (string, optional)
- `name` (string, optional)
- `organization` (OrganizationRef, optional)

### OrganizationRef

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

## Examples

**Request**

```json
{
  "items": [
    {
      "id": "id"
    }
  ]
}
```

**Response**

```json
{
  "items": [
    {
      "__typename": "__typename",
      "createdAt": "createdAt",
      "id": "id",
      "modifiedAt": "modifiedAt",
      "role": "MEMBER"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://{tenant_name}.benchling.com/api/v3/group-membership:batch-update"

payload = { "items": [{ "id": "id" }] }
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/group-membership:batch-update';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"items":[{"id":"id"}]}'
};

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