---
title: "Create AppSession"
method: POST
path: "/api/v3/app-session"
tags: ["App Session"]
---

# Create AppSession

`POST /api/v3/app-session`

## Request

- Base URL: `https://{tenant_name}.benchling.com`
- URL: `https://{tenant_name}.benchling.com/api/v3/app-session`
- Auth: HTTP bearer

Create AppSession.

## Headers

- `EARLY-ACCESS` string

## Request body

- CreateAppSessionInput
  - `appId` string, required: API ID of the Benchling App that owns this session.
  - `messages` AppSessionMessageInput[]: Initial messages to display. If omitted, the session starts with no messages.
    - `content` string, required
    - `style` 'NONE' | 'INFO' | 'WARNING' | 'SUCCESS' | 'ERROR': Visual style for this message. Defaults to NONE if omitted.
  - `name` string, required: Human-readable name for this session.
  - `timeoutSeconds` integer, required: Maximum session duration in seconds before automatic timeout (1 to 2592000).

## Response `201`

Created

- AppSession: Represents a running or completed session for a Benchling App. App sessions track long-running app operations, providing status updates and user-facing messages. Each session belongs to a single app installation and progresses through a lifecycle from RUNNING to a terminal status. Sessions are updated by appending new versions, which can change the status, timeout, and displayed messages.
  - `__typename` string
  - `app` IAppInstallationRef
    - `__typename` string
    - `id` string, api_id
  - `createdAt` string, datetime
  - `id` string
  - `messages` AppSessionMessage[]: The messages currently displayed to the user, from the most recent session version.
    - `__typename` string
    - `content` string: The text body of the message, which may contain chip references like `{id:ent_abc123}`.
    - `style` 'NONE' | 'INFO' | 'WARNING' | 'SUCCESS' | 'ERROR': The visual style applied to this message.
  - `modifiedAt` string, datetime
  - `name` string
  - `status` 'RUNNING' | 'SUCCEEDED' | 'FAILED' | 'COMPLETED_WITH_WARNINGS' | 'TIMEOUT': The current lifecycle status of this session, derived from the most recent version.
  - `timeoutSeconds` integer: Maximum duration in seconds before the session times out automatically. Once the session's age exceeds this value and the session has not been finalized, its status becomes TIMEOUT.

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `429`: Too Many Requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/benchling/apis/benchling-api.md) - [All operations](https://skmtc.dev/benchling/apis/benchling-api/llms.txt) - [OpenAPI document](https://skmtc.dev/benchling/apis/benchling-api/revisions/3873a10bf7b8?raw)
