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

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

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

Reference: https://docs.benchling.com/docs/api/benchling-api/study-schema/batchupdate

## Authentication

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

## Request

### Body (application/json)

This endpoint expects an object.

- `items` (list of UpdateStudySchemaInputWithPathParams, required)

## Response

### 200

OK

- `items` (list of StudySchema, required)

## Errors

### 400 Study Schema 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 Study Schema 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 Study Schema 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 Study Schema 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 Study Schema 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)
- `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 Study Schema 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

### UpdateStudySchemaInputWithPathParams

- `id` (string, required) — The API ID of the schema to update. The schema must exist and be accessible.
- `archiveReason` (string, optional)
- `archived` (boolean, optional)
- `description` (string, optional) — Updated description. When provided, must be at most 1000 characters.
- `entryTemplateIds` (list of string, optional) — Replacement entry template IDs for this schema.
- `idGenerationMode` (enum, optional) — Updated study ID generation mode. Changing this setting only affects studies created from now on; existing studies keep their IDs. When switching to AUTO_GENERATED_FROM_PREFIX, numbering continues from the highest existing ID that uses the prefix. When switching to MANUAL, the prefix is automatically cleared if no prefix value is provided.
  - Allowed values: `AUTO_GENERATED_FROM_PREFIX`, `MANUAL`
- `isDesignApprovalRequired` (boolean, optional) — Updated design approval requirement.
- `name` (string, optional) — Updated user-facing name. When provided, must be non-empty after stripping whitespace, at most 255 characters, and unique within the organization.
- `prefix` (string, optional) — Updated ID prefix for this schema.
- `systemName` (string, optional) — Updated SQL identifier for the warehouse table name. When provided, must match the pattern [a-z_][a-z0-9_$]*, cannot be a reserved table name, cannot start with 'bnch$', and must be unique within the organization.
- `displayName` (string, optional, deprecated) — Deprecated. Use name instead.

### StudySchema

A configuration template that defines the structure and behavior of Studies within an organization. Each `StudySchema` specifies the `studyType`, which determines available features and workflow capabilities. Schemas define custom fields through `fieldDefinitions` that studies of this type must populate. The `isDesignApprovalRequired` flag controls whether study designs must go through a review process before execution. Associated `entryTemplates` provide standardized notebook templates for documenting study work. Studies reference their schema via `Study.studySchema`.

- `__typename` (string, optional)
- `archiveReason` (string, optional, nullable)
- `archived` (boolean, optional)
- `createdAt` (string, optional, nullable)
- `creator` (PrincipalRef, optional)
- `description` (string, optional) — A description of this study schema for documentation purposes.
- `entryTemplates` (string, optional)
- `fieldDefinitions` (string, optional)
- `id` (string, optional)
- `idGenerationMode` (enum, optional) — How Study IDs are assigned for studies of this schema.
  - Allowed values: `AUTO_GENERATED_FROM_PREFIX`, `MANUAL`
- `isDesignApprovalRequired` (boolean, optional)
- `modifiedAt` (string, optional, nullable)
- `name` (string, optional)
- `organization` (OrganizationRef, optional)
- `prefix` (string, optional, nullable)
- `studyType` (enum, optional)
  - Allowed values: `CUSTOM`, `PROCESS_DEVELOPMENT`, `ASSAY_DEVELOPMENT`, `CLINICAL`, `PRECLINICAL`

### GeneralErrorDetail

### TooManyRequestsErrorBodyDetail

### InternalServerErrorBodyDetail

### PrincipalRef

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

### OrganizationRef

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

## Examples

**Request**

```json
{
  "items": [
    {
      "id": "stdysch_ztQQGSSF",
      "entryTemplateIds": [
        "tmpl_kT6BHBdZ",
        "tmpl_3wievUIJ"
      ],
      "isDesignApprovalRequired": false,
      "name": "Phase II Clinical Study (Updated)"
    }
  ]
}
```

**Response**

```json
{
  "items": [
    {
      "__typename": "__typename",
      "archiveReason": "archiveReason",
      "archived": true,
      "createdAt": "createdAt",
      "description": "description",
      "entryTemplates": "entryTemplates",
      "fieldDefinitions": "fieldDefinitions",
      "id": "id",
      "idGenerationMode": "AUTO_GENERATED_FROM_PREFIX",
      "isDesignApprovalRequired": true,
      "modifiedAt": "modifiedAt",
      "name": "name",
      "prefix": "prefix",
      "studyType": "CUSTOM"
    }
  ]
}
```

**SDK Code**

```python
import requests

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

payload = { "items": [
        {
            "id": "stdysch_ztQQGSSF",
            "entryTemplateIds": ["tmpl_kT6BHBdZ", "tmpl_3wievUIJ"],
            "isDesignApprovalRequired": False,
            "name": "Phase II Clinical Study (Updated)"
        }
    ] }
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/study-schema:batch-update';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"items":[{"id":"stdysch_ztQQGSSF","entryTemplateIds":["tmpl_kT6BHBdZ","tmpl_3wievUIJ"],"isDesignApprovalRequired":false,"name":"Phase II Clinical Study (Updated)"}]}'
};

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