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

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

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

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

## 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 CreateStudySchemaInput, required)

## Response

### 201

Created

- `items` (list of StudySchema, required)

## Errors

### 400 Study Schema Batch Create 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 Create 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 Create 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 Create 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 Create 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 Create 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

### CreateStudySchemaInput

- `description` (string, required) — A human-readable description of the schema. At most 1000 characters.
- `idGenerationMode` (enum, required) — How study IDs are assigned for studies created from this schema. AUTO_GENERATED_FROM_PREFIX requires a non-empty prefix and does not accept a caller-provided ID. MANUAL requires an empty prefix. A study ID may be provided at creation, and if omitted the server generates one.
  - Allowed values: `AUTO_GENERATED_FROM_PREFIX`, `MANUAL`
- `organizationId` (string, required) — The API ID of the organization this schema belongs to. The organization must exist and be accessible to the caller.
- `studyType` (enum, required) — Type of studies created from this schema.
  - Allowed values: `CUSTOM`, `PROCESS_DEVELOPMENT`, `ASSAY_DEVELOPMENT`, `CLINICAL`, `PRECLINICAL`
- `entryTemplateIds` (list of string, optional) — Entry template IDs associated with this schema.
- `fieldDefinitions` (list of CreateStudySchemaInputFieldDefinitionsItem, optional) — Field definitions for this schema.
- `isDesignApprovalRequired` (boolean, optional) — Whether design approval is required for studies of this schema.
- `name` (string, optional) — The user-facing name of the schema. Must be non-empty after stripping whitespace, at most 255 characters, and unique within the organization.
- `prefix` (string, optional) — ID prefix for studies of this schema.
- `systemName` (string, optional) — The SQL identifier used as the warehouse table name. If not provided, one is auto-generated from the display name. 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

### CreateStudySchemaInputFieldDefinitionsItem

- `type`: `BOOLEAN`
  - `isRequired` (boolean, required) — When true, a value must be provided for this field.
  - `name` (string, required) — The user-facing display name of this field definition. Must be unique within the schema.
  - `systemName` (string, required) — The machine-readable identifier used as the warehouse column name. Must be unique within the schema.
  - `description` (string, optional) — An optional user-provided description of this field definition.
- `type`: `DATE`
  - `isRequired` (boolean, required) — When true, a value must be provided for this field.
  - `name` (string, required) — The user-facing display name of this field definition. Must be unique within the schema.
  - `systemName` (string, required) — The machine-readable identifier used as the warehouse column name. Must be unique within the schema.
  - `description` (string, optional) — An optional user-provided description of this field definition.
- `type`: `DATE_TIME`
  - `isRequired` (boolean, required) — When true, a value must be provided for this field.
  - `name` (string, required) — The user-facing display name of this field definition. Must be unique within the schema.
  - `systemName` (string, required) — The machine-readable identifier used as the warehouse column name. Must be unique within the schema.
  - `description` (string, optional) — An optional user-provided description of this field definition.
- `type`: `DECIMAL`
  - `isRequired` (boolean, required) — When true, a value must be provided for this field.
  - `name` (string, required) — The user-facing display name of this field definition. Must be unique within the schema.
  - `systemName` (string, required) — The machine-readable identifier used as the warehouse column name. Must be unique within the schema.
  - `description` (string, optional) — An optional user-provided description of this field definition.
  - `displayPrecision` (integer, optional) — The number of decimal places to display (0 to 10).
  - `numericMax` (double, optional) — The maximum allowed value, inclusive.
  - `numericMin` (double, optional) — The minimum allowed value, inclusive.
  - `unitId` (string, optional) — The API ID of the unit to associate with this field.
- `type`: `INTEGER`
  - `isRequired` (boolean, required) — When true, a value must be provided for this field.
  - `name` (string, required) — The user-facing display name of this field definition. Must be unique within the schema.
  - `systemName` (string, required) — The machine-readable identifier used as the warehouse column name. Must be unique within the schema.
  - `description` (string, optional) — An optional user-provided description of this field definition.
  - `numericMax` (double, optional) — The maximum allowed value, inclusive.
  - `numericMin` (double, optional) — The minimum allowed value, inclusive.
  - `unitId` (string, optional) — The API ID of the unit to associate with this field.
- `type`: `JSON`
  - `isRequired` (boolean, required) — When true, a value must be provided for this field.
  - `name` (string, required) — The user-facing display name of this field definition. Must be unique within the schema.
  - `systemName` (string, required) — The machine-readable identifier used as the warehouse column name. Must be unique within the schema.
  - `description` (string, optional) — An optional user-provided description of this field definition.
- `type`: `LONG_TEXT`
  - `isRequired` (boolean, required) — When true, a value must be provided for this field.
  - `name` (string, required) — The user-facing display name of this field definition. Must be unique within the schema.
  - `systemName` (string, required) — The machine-readable identifier used as the warehouse column name. Must be unique within the schema.
  - `description` (string, optional) — An optional user-provided description of this field definition.
- `type`: `TEXT`
  - `isRequired` (boolean, required) — When true, a value must be provided for this field.
  - `name` (string, required) — The user-facing display name of this field definition. Must be unique within the schema.
  - `systemName` (string, required) — The machine-readable identifier used as the warehouse column name. Must be unique within the schema.
  - `description` (string, optional) — An optional user-provided description of this field definition.
- `type`: `AA_SEQUENCE_LINK`
  - `isMulti` (boolean, required) — When true, multiple linked values are allowed.
  - `isRequired` (boolean, required) — When true, a value must be provided for this field.
  - `linkDefinitionId` (string, required, nullable) — The API ID of the schema to constrain links to, or null to allow links to any AA sequence.
  - `name` (string, required) — The user-facing display name of this field definition. Must be unique within the schema.
  - `systemName` (string, required) — The machine-readable identifier used as the warehouse column name. Must be unique within the schema.
  - `description` (string, optional) — An optional user-provided description of this field definition.
  - `isParent` (boolean, optional) — When true, indicates a parent-child relationship used in the registry's lot-numbering functionality.
- `type`: `PROTEIN_LINK`
  - `isMulti` (boolean, required) — When true, multiple linked values are allowed.
  - `isRequired` (boolean, required) — When true, a value must be provided for this field.
  - `linkDefinitionId` (string, required, nullable) — The API ID of the schema to constrain links to, or null to allow links to any antibody.
  - `name` (string, required) — The user-facing display name of this field definition. Must be unique within the schema.
  - `systemName` (string, required) — The machine-readable identifier used as the warehouse column name. Must be unique within the schema.
  - `description` (string, optional) — An optional user-provided description of this field definition.
  - `isParent` (boolean, optional) — When true, indicates a parent-child relationship used in the registry's lot-numbering functionality.
- `type`: `ENTITY_LINK`
  - `isMulti` (boolean, required) — When true, multiple linked values are allowed.
  - `isRequired` (boolean, required) — When true, a value must be provided for this field.
  - `name` (string, required) — The user-facing display name of this field definition. Must be unique within the schema.
  - `systemName` (string, required) — The machine-readable identifier used as the warehouse column name. Must be unique within the schema.
  - `description` (string, optional) — An optional user-provided description of this field definition.
- `type`: `ATTACHMENT_LINK`
  - `isMulti` (boolean, required) — When true, multiple linked values are allowed.
  - `isRequired` (boolean, required) — When true, a value must be provided for this field.
  - `name` (string, required) — The user-facing display name of this field definition. Must be unique within the schema.
  - `systemName` (string, required) — The machine-readable identifier used as the warehouse column name. Must be unique within the schema.
  - `description` (string, optional) — An optional user-provided description of this field definition.
- `type`: `CUSTOM_ENTITY_LINK`
  - `isMulti` (boolean, required) — When true, multiple linked values are allowed.
  - `isRequired` (boolean, required) — When true, a value must be provided for this field.
  - `linkDefinitionId` (string, required, nullable) — The API ID of the schema to constrain links to, or null to allow links to any custom entity.
  - `name` (string, required) — The user-facing display name of this field definition. Must be unique within the schema.
  - `systemName` (string, required) — The machine-readable identifier used as the warehouse column name. Must be unique within the schema.
  - `description` (string, optional) — An optional user-provided description of this field definition.
  - `isParent` (boolean, optional) — When true, indicates a parent-child relationship used in the registry's lot-numbering functionality.
- `type`: `DNA_SEQUENCE_LINK`
  - `isMulti` (boolean, required) — When true, multiple linked values are allowed.
  - `isRequired` (boolean, required) — When true, a value must be provided for this field.
  - `linkDefinitionId` (string, required, nullable) — The API ID of the schema to constrain links to, or null to allow links to any DNA sequence.
  - `name` (string, required) — The user-facing display name of this field definition. Must be unique within the schema.
  - `systemName` (string, required) — The machine-readable identifier used as the warehouse column name. Must be unique within the schema.
  - `description` (string, optional) — An optional user-provided description of this field definition.
  - `isParent` (boolean, optional) — When true, indicates a parent-child relationship used in the registry's lot-numbering functionality.
- `type`: `DROPDOWN`
  - `dropdownId` (string, required) — The API ID of the Dropdown that defines the available options.
  - `isMulti` (boolean, required) — When true, multiple linked values are allowed.
  - `isRequired` (boolean, required) — When true, a value must be provided for this field.
  - `name` (string, required) — The user-facing display name of this field definition. Must be unique within the schema.
  - `systemName` (string, required) — The machine-readable identifier used as the warehouse column name. Must be unique within the schema.
  - `description` (string, optional) — An optional user-provided description of this field definition.
- `type`: `EQUIPMENT_LINK`
  - `isMulti` (boolean, required) — When true, multiple linked values are allowed.
  - `isRequired` (boolean, required) — When true, a value must be provided for this field.
  - `linkDefinitionId` (string, required, nullable) — The API ID of the schema to constrain links to, or null to allow links to any equipment.
  - `name` (string, required) — The user-facing display name of this field definition. Must be unique within the schema.
  - `systemName` (string, required) — The machine-readable identifier used as the warehouse column name. Must be unique within the schema.
  - `description` (string, optional) — An optional user-provided description of this field definition.
  - `isParent` (boolean, optional) — When true, indicates a parent-child relationship used in the registry's lot-numbering functionality.
- `type`: `FIELDSET_LINK`
  - `isMulti` (boolean, required) — When true, multiple linked values are allowed.
  - `isRequired` (boolean, required) — When true, a value must be provided for this field.
  - `linkDefinitionId` (string, required) — The API ID of the schema/interface that linked items must belong to.
  - `name` (string, required) — The user-facing display name of this field definition. Must be unique within the schema.
  - `systemName` (string, required) — The machine-readable identifier used as the warehouse column name. Must be unique within the schema.
  - `description` (string, optional) — An optional user-provided description of this field definition.
  - `isParent` (boolean, optional) — When true, indicates a parent-child relationship used in the registry's lot-numbering functionality.
- `type`: `MIXTURE_LINK`
  - `isMulti` (boolean, required) — When true, multiple linked values are allowed.
  - `isRequired` (boolean, required) — When true, a value must be provided for this field.
  - `linkDefinitionId` (string, required, nullable) — The API ID of the schema to constrain links to, or null to allow links to any mixture.
  - `name` (string, required) — The user-facing display name of this field definition. Must be unique within the schema.
  - `systemName` (string, required) — The machine-readable identifier used as the warehouse column name. Must be unique within the schema.
  - `description` (string, optional) — An optional user-provided description of this field definition.
  - `isParent` (boolean, optional) — When true, indicates a parent-child relationship used in the registry's lot-numbering functionality.
- `type`: `MOLECULE_LINK`
  - `isMulti` (boolean, required) — When true, multiple linked values are allowed.
  - `isRequired` (boolean, required) — When true, a value must be provided for this field.
  - `linkDefinitionId` (string, required, nullable) — The API ID of the schema to constrain links to, or null to allow links to any molecule.
  - `name` (string, required) — The user-facing display name of this field definition. Must be unique within the schema.
  - `systemName` (string, required) — The machine-readable identifier used as the warehouse column name. Must be unique within the schema.
  - `description` (string, optional) — An optional user-provided description of this field definition.
  - `isParent` (boolean, optional) — When true, indicates a parent-child relationship used in the registry's lot-numbering functionality.
- `type`: `OLIGO_CONJUGATE_LINK`
  - `isMulti` (boolean, required) — When true, multiple linked values are allowed.
  - `isRequired` (boolean, required) — When true, a value must be provided for this field.
  - `linkDefinitionId` (string, required, nullable) — The API ID of the schema to constrain links to, or null to allow links to any oligo conjugate.
  - `name` (string, required) — The user-facing display name of this field definition. Must be unique within the schema.
  - `systemName` (string, required) — The machine-readable identifier used as the warehouse column name. Must be unique within the schema.
  - `description` (string, optional) — An optional user-provided description of this field definition.
  - `isParent` (boolean, optional) — When true, indicates a parent-child relationship used in the registry's lot-numbering functionality.
- `type`: `OLIGO_DUPLEX_LINK`
  - `isMulti` (boolean, required) — When true, multiple linked values are allowed.
  - `isRequired` (boolean, required) — When true, a value must be provided for this field.
  - `linkDefinitionId` (string, required, nullable) — The API ID of the schema to constrain links to, or null to allow links to any oligo duplex.
  - `name` (string, required) — The user-facing display name of this field definition. Must be unique within the schema.
  - `systemName` (string, required) — The machine-readable identifier used as the warehouse column name. Must be unique within the schema.
  - `description` (string, optional) — An optional user-provided description of this field definition.
  - `isParent` (boolean, optional) — When true, indicates a parent-child relationship used in the registry's lot-numbering functionality.
- `type`: `RNA_SEQUENCE_LINK`
  - `isMulti` (boolean, required) — When true, multiple linked values are allowed.
  - `isRequired` (boolean, required) — When true, a value must be provided for this field.
  - `linkDefinitionId` (string, required) — The API ID of the schema/interface that linked items must belong to.
  - `name` (string, required) — The user-facing display name of this field definition. Must be unique within the schema.
  - `systemName` (string, required) — The machine-readable identifier used as the warehouse column name. Must be unique within the schema.
  - `description` (string, optional) — An optional user-provided description of this field definition.
  - `isParent` (boolean, optional) — When true, indicates a parent-child relationship used in the registry's lot-numbering functionality.
- `type`: `STORAGE_LINK`
  - `isMulti` (boolean, required) — When true, multiple linked values are allowed.
  - `isRequired` (boolean, required) — When true, a value must be provided for this field.
  - `linkDefinitionId` (string, required, nullable) — The API ID of the schema to constrain links to, or null to allow links to any storage location.
  - `name` (string, required) — The user-facing display name of this field definition. Must be unique within the schema.
  - `systemName` (string, required) — The machine-readable identifier used as the warehouse column name. Must be unique within the schema.
  - `description` (string, optional) — An optional user-provided description of this field definition.
- `type`: `SYSTEM_CATEGORY_LINK`
  - `isMulti` (boolean, required) — When true, multiple linked values are allowed.
  - `isRequired` (boolean, required) — When true, a value must be provided for this field.
  - `linkDefinitionId` (string, required) — The API ID of the schema/interface that linked items must belong to.
  - `name` (string, required) — The user-facing display name of this field definition. Must be unique within the schema.
  - `systemName` (string, required) — The machine-readable identifier used as the warehouse column name. Must be unique within the schema.
  - `description` (string, optional) — An optional user-provided description of this field definition.

### PrincipalRef

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

### OrganizationRef

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

## Examples

**Request**

```json
{
  "items": [
    {
      "description": "Schema for phase II clinical trials.",
      "idGenerationMode": "AUTO_GENERATED_FROM_PREFIX",
      "organizationId": "ent_a0SApq3z",
      "studyType": "CLINICAL",
      "entryTemplateIds": [
        "tmpl_kT6BHBdZ"
      ],
      "fieldDefinitions": [
        {
          "type": "TEXT",
          "isRequired": true,
          "name": "name",
          "systemName": "systemName"
        },
        {
          "type": "INTEGER",
          "isRequired": true,
          "name": "name",
          "systemName": "systemName"
        },
        {
          "type": "BOOLEAN",
          "isRequired": true,
          "name": "name",
          "systemName": "systemName"
        }
      ],
      "isDesignApprovalRequired": true,
      "name": "Phase II Clinical Study",
      "prefix": "CLIN"
    }
  ]
}
```

**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-create"

payload = { "items": [
        {
            "description": "Schema for phase II clinical trials.",
            "idGenerationMode": "AUTO_GENERATED_FROM_PREFIX",
            "organizationId": "ent_a0SApq3z",
            "studyType": "CLINICAL",
            "entryTemplateIds": ["tmpl_kT6BHBdZ"],
            "fieldDefinitions": [
                {
                    "type": "TEXT",
                    "isRequired": True,
                    "name": "name",
                    "systemName": "systemName"
                },
                {
                    "type": "INTEGER",
                    "isRequired": True,
                    "name": "name",
                    "systemName": "systemName"
                },
                {
                    "type": "BOOLEAN",
                    "isRequired": True,
                    "name": "name",
                    "systemName": "systemName"
                }
            ],
            "isDesignApprovalRequired": True,
            "name": "Phase II Clinical Study",
            "prefix": "CLIN"
        }
    ] }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://{tenant_name}.benchling.com/api/v3/study-schema:batch-create';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"items":[{"description":"Schema for phase II clinical trials.","idGenerationMode":"AUTO_GENERATED_FROM_PREFIX","organizationId":"ent_a0SApq3z","studyType":"CLINICAL","entryTemplateIds":["tmpl_kT6BHBdZ"],"fieldDefinitions":[{"type":"TEXT","isRequired":true,"name":"name","systemName":"systemName"},{"type":"INTEGER","isRequired":true,"name":"name","systemName":"systemName"},{"type":"BOOLEAN","isRequired":true,"name":"name","systemName":"systemName"}],"isDesignApprovalRequired":true,"name":"Phase II Clinical Study","prefix":"CLIN"}]}'
};

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