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

# Print labels

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

Print labels. Supported print methods are "REMOTE_PRINT_SERVER", "LEGACY_HTTP", and "LEGACY_TCP".

Reference: https://docs.benchling.com/docs/api/v2/benchling-api/containers/print-labels

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

- `containerIds` (list of string, required) — List of IDs of containers that will have labels printed (one label will be printed per container).
- `labelTemplateId` (string, required) — ID of label template to use (same template will be used for all labels printed).
- `printerId` (string, required) — ID of printer to use (same printer will be used for all labels printed).

## Response

### 200

OK

## Errors

### 400 Bad Request Error

Bad Request

- `error` (BadRequestErrorError, optional)

## Types

### BadRequestErrorError

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

## Examples

**Request**

```json
{
  "containerIds": [
    "string"
  ],
  "labelTemplateId": "lbltmp_lCpY5Qvh",
  "printerId": "print_YJQkilOJ"
}
```

**Response**

```json
{}
```

**SDK Code**

```python
import requests

url = "https://{tenant_name}.benchling.com/api/v2/containers:print-labels"

payload = {
    "containerIds": ["string"],
    "labelTemplateId": "lbltmp_lCpY5Qvh",
    "printerId": "print_YJQkilOJ"
}
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/containers:print-labels';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"containerIds":["string"],"labelTemplateId":"lbltmp_lCpY5Qvh","printerId":"print_YJQkilOJ"}'
};

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