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

# Create StudySchema

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

Create a study schema.

## ID generation

- For `AUTO_GENERATED_FROM_PREFIX`, provide a non-empty, unique `prefix`. New studies receive IDs generated from that prefix.
- For `MANUAL`, omit `prefix` or provide an empty value. Callers must provide IDs when creating studies with this schema.

## Study-type restrictions

- `entryTemplateIds` associates entry templates with the schema and is supported only for `CUSTOM` study schemas. Provide at most 50 IDs.
- `isDesignApprovalRequired` is supported for `CUSTOM` schemas and, when design review is enabled for the tenant, for `CLINICAL` and `PRECLINICAL` schemas. It is not supported for `PROCESS_DEVELOPMENT` or `ASSAY_DEVELOPMENT` schemas.

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

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

## Response

### 201

Created

- `__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`

## Errors

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

### 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)

### GeneralErrorDetail

### TooManyRequestsErrorBodyDetail

### InternalServerErrorBodyDetail

## Examples

**Request**

```json
{
  "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
{
  "__typename": "__typename",
  "archiveReason": "archiveReason",
  "archived": true,
  "createdAt": "createdAt",
  "creator": {
    "__typename": "__typename",
    "id": "id"
  },
  "description": "description",
  "entryTemplates": "entryTemplates",
  "fieldDefinitions": "fieldDefinitions",
  "id": "id",
  "idGenerationMode": "AUTO_GENERATED_FROM_PREFIX",
  "isDesignApprovalRequired": true,
  "modifiedAt": "modifiedAt",
  "name": "name",
  "organization": {
    "__typename": "__typename",
    "id": "id"
  },
  "prefix": "prefix",
  "studyType": "CUSTOM"
}
```

**SDK Code**

```python
import requests

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

payload = {
    "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';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"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);
}
```