> 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 an app

POST https://{tenant_name}.benchling.com/api/v2/apps
Content-Type: application/json

Create an app

Reference: https://docs.benchling.com/docs/api/v2/benchling-api/apps/create-benchling-app

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

- `name` (string, required)
- `description` (string, optional)

## Response

### 201

Created

- `apiURL` (string, optional)
- `archiveRecord` (ArchiveRecord, optional, nullable)
- `createdAt` (datetime, optional) — DateTime at which the the app was created
- `creator` (UserSummary, optional)
- `description` (string, optional)
- `id` (string, optional)
- `modifiedAt` (datetime, optional) — DateTime at which the the app was last modified
- `name` (string, optional)
- `webURL` (string, optional)

## Errors

### 400 Bad Request Error

Bad Request

- `error` (BadRequestErrorError, optional)

### 403 Forbidden Error

Forbidden

- `error` (ForbiddenErrorError, optional)

### 409 Conflict Error

Conflict

- `error` (ConflictErrorError, optional)

## Types

### ArchiveRecord

- `reason` (string, optional)

### UserSummary

- `handle` (string, optional)
- `id` (string, optional)
- `name` (string, optional)

### BadRequestErrorError

- `message` (string, optional)
- `type` (enum, optional)
  - Allowed values: `invalid_request_error`
- `userMessage` (string, optional)

### ForbiddenErrorError

- `invalidId` (string, optional)
- `message` (string, optional)
- `type` (string, optional)
- `userMessage` (string, optional)

### ConflictErrorError

- `message` (string, optional)
- `type` (string, optional)
- `userMessage` (string, optional)
- `conflicts` (list of ConflictErrorErrorConflictsItems, optional)

### ConflictErrorErrorConflictsItems

## Examples

**Request**

```json
{
  "name": "My First App"
}
```

**Response**

```json
{
  "apiURL": "https://benchling.com/api/v2/apps/app_e59sjL23Pqn30xHg",
  "archiveRecord": {
    "reason": "Made in error"
  },
  "createdAt": "2024-01-15T09:30:00Z",
  "creator": {
    "handle": "string",
    "id": "string",
    "name": "string"
  },
  "description": "This is my first App!",
  "id": "app_e59sjL23Pqn30xHg",
  "modifiedAt": "2024-01-15T09:30:00Z",
  "name": "My First App",
  "webURL": "https://benchling.com/developer/apps/app_e59sjL23Pqn30xHg"
}
```

**SDK Code**

```python
import requests

url = "https://{tenant_name}.benchling.com/api/v2/apps"

payload = { "name": "My First App" }
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/v2/apps';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"name":"My First App"}'
};

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