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

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

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

Reference: https://docs.benchling.com/docs/api/benchling-api/app-canvas/batchcreate

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

## Response

### 201

Created

- `items` (list of AppCanvas, required)

## Errors

### 400 App Canvas 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 App Canvas 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 App Canvas 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 App Canvas 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 App Canvas 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 App Canvas 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

### CreateAppCanvasInput

- `appId` (string, required) — API ID of the Benchling App that owns this canvas.
- `blocks` (list of AppCanvasUiBlockInput, required) — UI blocks defining the canvas layout and interactivity.
- `featureId` (string, required) — Feature ID from the app manifest that this canvas corresponds to.
- `resourceId` (string, required) — Identifier of the resource object to attach the canvas to.
- `data` (string, optional) — Optional JSON string (max 5 KiB) of app-managed data not rendered in the canvas UI.
- `enabled` (boolean, optional) — Whether the canvas is interactable. When false, all blocks are disabled regardless of their individual enabled settings.
- `sessionId` (string, optional) — Optional app session ID whose status messages are shown in the canvas.

### AppCanvas

Represents a Benchling App canvas, an embedded UI surface that apps use to render custom interactive content within notebook entries, entry templates, assay runs, or app homepages. Each canvas belongs to a single app and contains a list of UI blocks that define the canvas layout and interactivity.

- `__typename` (string, optional)
- `app` (IAppInstallationRef, optional)
- `archiveReason` (string, optional, nullable)
- `archived` (boolean, optional)
- `blocks` (list of AppCanvasBlocksItem, optional)
- `createdAt` (string, optional)
- `data` (string, optional, nullable)
- `enabled` (boolean, optional)
- `featureId` (string, optional, nullable)
- `id` (string, optional)
- `modifiedAt` (string, optional)
- `resourceId` (string, optional)
- `sessionId` (string, optional, nullable)

### GeneralErrorDetail

### TooManyRequestsErrorBodyDetail

### InternalServerErrorBodyDetail

### AppCanvasUiBlockInput

- `type` (enum, required)
  - Allowed values: `BUTTON`, `CHIP`, `DROPDOWN`, `DROPDOWN_MULTIVALUE`, `FILE_UPLOAD`, `MARKDOWN`, `SEARCH_INPUT`, `SEARCH_INPUT_MULTIVALUE`, `SECTION`, `SELECTOR_INPUT`, `SELECTOR_INPUT_MULTIVALUE`, `TABLE`, `TEXT_INPUT`
- `enabled` (boolean, optional)
- `id` (string, optional)
- `text` (string, optional)
- `value` (string, optional)
- `dropdownId` (string, optional)
- `label` (string, optional)
- `placeholder` (string, optional)
- `required` (boolean, optional)
- `fileTypes` (list of string, optional)
- `maxFiles` (integer, optional)
- `itemType` (enum, optional)
  - Allowed values: `DNA_SEQUENCE`, `DNA_OLIGO`, `AA_SEQUENCE`, `CUSTOM_ENTITY`, `MIXTURE`, `BOX`, `CONTAINER`, `LOCATION`, `PLATE`, `WORKLIST`
- `schemaId` (string, optional)
- `children` (list of UiBlockLeafNodeInput, optional)
- `options` (list of string, optional)
- `dataFrameId` (string, optional) — Data frame ID backing the table.
- `name` (string, optional)

### IAppInstallationRef

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

### AppCanvasBlocksItem

Union of ButtonUiBlock, ChipUiBlock, DropdownUiBlock, DropdownMultiValueUiBlock, FileUploadUiBlock, MarkdownUiBlock, SearchInputUiBlock, SearchInputMultiValueUiBlock, SectionUiBlock, SelectorInputUiBlock, SelectorInputMultiValueUiBlock, TextInputUiBlock, TableUiBlock

### UiBlockLeafNodeInput

- `type` (enum, required)
  - Allowed values: `BUTTON`, `CHIP`, `DROPDOWN`, `DROPDOWN_MULTIVALUE`, `FILE_UPLOAD`, `MARKDOWN`, `SEARCH_INPUT`, `SEARCH_INPUT_MULTIVALUE`, `SELECTOR_INPUT`, `SELECTOR_INPUT_MULTIVALUE`, `TEXT_INPUT`
- `enabled` (boolean, optional)
- `id` (string, optional)
- `text` (string, optional)
- `value` (string, optional)
- `dropdownId` (string, optional)
- `label` (string, optional)
- `placeholder` (string, optional)
- `required` (boolean, optional)
- `fileTypes` (list of string, optional)
- `maxFiles` (integer, optional)
- `itemType` (enum, optional)
  - Allowed values: `DNA_SEQUENCE`, `DNA_OLIGO`, `AA_SEQUENCE`, `CUSTOM_ENTITY`, `MIXTURE`, `BOX`, `CONTAINER`, `LOCATION`, `PLATE`, `WORKLIST`
- `schemaId` (string, optional)
- `options` (list of string, optional)

### ButtonUiBlock

A button block that triggers an app interaction when clicked.

- `__typename` (string, optional)
- `enabled` (boolean, optional, nullable)
- `id` (string, optional)
- `text` (string, optional)

### ChipUiBlock

A chip block that displays a short piece of information.

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

### DropdownUiBlock

A dropdown block backed by a Benchling dropdown registry.

- `__typename` (string, optional)
- `dropdownId` (string, optional)
- `enabled` (boolean, optional, nullable)
- `id` (string, optional)
- `label` (string, optional, nullable)
- `placeholder` (string, optional, nullable)
- `required` (boolean, optional, nullable)
- `value` (string, optional, nullable)

### DropdownMultiValueUiBlock

A multi-select dropdown block backed by a Benchling dropdown registry.

- `__typename` (string, optional)
- `dropdownId` (string, optional)
- `enabled` (boolean, optional, nullable)
- `id` (string, optional)
- `label` (string, optional, nullable)
- `placeholder` (string, optional, nullable)
- `required` (boolean, optional, nullable)
- `value` (list of string, optional, nullable)

### FileUploadUiBlock

A file upload block that accepts one or more file attachments.

- `__typename` (string, optional)
- `enabled` (boolean, optional, nullable)
- `fileTypes` (list of string, optional, nullable)
- `id` (string, optional)
- `label` (string, optional, nullable)
- `maxFiles` (integer, optional, nullable)
- `required` (boolean, optional, nullable)
- `value` (list of string, optional, nullable)

### MarkdownUiBlock

A block that renders Markdown content.

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

### SearchInputUiBlock

A search input block for selecting a single Benchling entity.

- `__typename` (string, optional)
- `enabled` (boolean, optional, nullable)
- `id` (string, optional)
- `itemType` (enum, optional)
  - Allowed values: `DNA_SEQUENCE`, `DNA_OLIGO`, `AA_SEQUENCE`, `CUSTOM_ENTITY`, `MIXTURE`, `BOX`, `CONTAINER`, `LOCATION`, `PLATE`, `WORKLIST`
- `label` (string, optional, nullable)
- `placeholder` (string, optional, nullable)
- `required` (boolean, optional, nullable)
- `schemaId` (string, optional, nullable)
- `value` (string, optional, nullable)

### SearchInputMultiValueUiBlock

A multi-select search input block for selecting multiple Benchling entities.

- `__typename` (string, optional)
- `enabled` (boolean, optional, nullable)
- `id` (string, optional)
- `itemType` (enum, optional)
  - Allowed values: `DNA_SEQUENCE`, `DNA_OLIGO`, `AA_SEQUENCE`, `CUSTOM_ENTITY`, `MIXTURE`, `BOX`, `CONTAINER`, `LOCATION`, `PLATE`, `WORKLIST`
- `label` (string, optional, nullable)
- `placeholder` (string, optional, nullable)
- `required` (boolean, optional, nullable)
- `schemaId` (string, optional, nullable)
- `value` (list of string, optional, nullable)

### SectionUiBlock

A section block that groups child blocks together. Children are leaf blocks only.

- `__typename` (string, optional)
- `children` (list of SectionUiBlockChildrenItem, optional)
- `id` (string, optional)

### SelectorInputUiBlock

A selector input block with predefined options.

- `__typename` (string, optional)
- `enabled` (boolean, optional, nullable)
- `id` (string, optional)
- `label` (string, optional, nullable)
- `options` (list of string, optional)
- `placeholder` (string, optional, nullable)
- `required` (boolean, optional, nullable)
- `value` (string, optional, nullable)

### SelectorInputMultiValueUiBlock

A multi-select selector input block with predefined options.

- `__typename` (string, optional)
- `enabled` (boolean, optional, nullable)
- `id` (string, optional)
- `label` (string, optional, nullable)
- `options` (list of string, optional)
- `placeholder` (string, optional, nullable)
- `required` (boolean, optional, nullable)
- `value` (list of string, optional, nullable)

### TextInputUiBlock

A text input block that accepts freeform user text.

- `__typename` (string, optional)
- `enabled` (boolean, optional, nullable)
- `id` (string, optional)
- `label` (string, optional, nullable)
- `placeholder` (string, optional, nullable)
- `required` (boolean, optional, nullable)
- `value` (string, optional, nullable)

### TableUiBlock

A table block that displays tabular data from a dataset or data frame.

- `__typename` (string, optional)
- `dataFrameId` (string, optional)
- `enabled` (boolean, optional, nullable)
- `id` (string, optional)
- `name` (string, optional)

### SectionUiBlockChildrenItem

Union of ButtonUiBlock, ChipUiBlock, DropdownUiBlock, DropdownMultiValueUiBlock, FileUploadUiBlock, MarkdownUiBlock, SearchInputUiBlock, SearchInputMultiValueUiBlock, SelectorInputUiBlock, SelectorInputMultiValueUiBlock, TextInputUiBlock

## Examples

**Request**

```json
{
  "items": [
    {
      "appId": "appId",
      "blocks": [
        {
          "type": "BUTTON"
        }
      ],
      "featureId": "featureId",
      "resourceId": "resourceId"
    }
  ]
}
```

**Response**

```json
{
  "items": [
    {
      "__typename": "__typename",
      "archiveReason": "archiveReason",
      "archived": true,
      "blocks": [
        {}
      ],
      "createdAt": "createdAt",
      "data": "data",
      "enabled": true,
      "featureId": "featureId",
      "id": "id",
      "modifiedAt": "modifiedAt",
      "resourceId": "resourceId",
      "sessionId": "sessionId"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://{tenant_name}.benchling.com/api/v3/app-canvas:batch-create"

payload = { "items": [
        {
            "appId": "appId",
            "blocks": [{ "type": "BUTTON" }],
            "featureId": "featureId",
            "resourceId": "resourceId"
        }
    ] }
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/app-canvas:batch-create';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"items":[{"appId":"appId","blocks":[{"type":"BUTTON"}],"featureId":"featureId","resourceId":"resourceId"}]}'
};

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