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

# Get an app session

GET https://{tenant_name}.benchling.com/api/v2/app-sessions/{id}

Get an app session

Reference: https://docs.benchling.com/docs/api/v2/benchling-api/apps/get-app-session-by-id

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `id` (string, required)

### Query parameters

- `returning` (string, optional) — Comma-separated list of fields to return. Modifies the output shape. To return all keys at a given level, enumerate them or use the wildcard, '*'. For more information, [click here](https://docs.benchling.com/docs/getting-started-1#returning-query-parameter).

## Response

### 200

OK

- `app` (AppSessionApp, optional)
- `createdAt` (datetime, optional)
- `id` (string, optional)
- `messages` (list of AppSessionMessage, optional, nullable) — An array of `SessionMessage` describing the current session state.
- `modifiedAt` (datetime, optional)
- `name` (string, optional) — A brief description of the app's actions for users. Length must be between 3-100 chars. It becomes immutable once a value is set.
- `status` (enum, optional) — All possible values of a Session's status, including system-updated and user-updated values.
  - Allowed values: `COMPLETED_WITH_WARNINGS`, `FAILED`, `RUNNING`, `SUCCEEDED`, `TIMEOUT`
- `timeoutSeconds` (integer, optional) — Timeout in seconds, a value between 1 second and 30 days. Once set, it can only be increased, not decreased.

## Errors

### 404 Not Found Error

Not Found

- `error` (NotFoundErrorError, optional)

## Types

### AppSessionApp

- `id` (string, optional) — The id of the Benchling app.

### AppSessionMessage

- `content` (string, required) — A message string, to be rendered as plain text with Benchling chips. References to Benchling items (up to 10 per msg) will be rendered as chips in the Benchling UX. A valid reference is a Benchling API id, prefixed with "id:" and contained by braces. For example: "\{id:ent\_a0SApq3}."
- `style` (enum, optional, default: NONE)
  - Allowed values: `ERROR`, `INFO`, `NONE`, `SUCCESS`, `WARNING`

### NotFoundErrorError

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

## Examples

**Response**

```json
{
  "app": {
    "id": "string"
  },
  "createdAt": "2024-01-15T09:30:00Z",
  "id": "string",
  "messages": [
    {
      "content": "Transferred 4ml of {id:ent_a0SApq3z} to {id:con_ae92kBv9} with \\{priority: p3\\}.",
      "style": "NONE"
    }
  ],
  "modifiedAt": "2024-01-15T09:30:00Z",
  "name": "string",
  "status": "COMPLETED_WITH_WARNINGS",
  "timeoutSeconds": 1
}
```

**SDK Code**

```python
import requests

url = "https://{tenant_name}.benchling.com/api/v2/app-sessions/sesn_J2PGE0Z516Y"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://{tenant_name}.benchling.com/api/v2/app-sessions/sesn_J2PGE0Z516Y';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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