---
title: "Update AppSession"
method: PATCH
path: "/api/v3/app-session/{app_session_id}"
tags: ["App Session"]
---

# Update AppSession

`PATCH /api/v3/app-session/{app_session_id}`

## Request

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

Update AppSession.

## Path parameters

- `app_session_id` string, required

## Headers

- `EARLY-ACCESS` string

## Request body

- UpdateAppSessionInput
  - `messages` AppSessionMessageInput[]: Replace the current messages with this list. If omitted, the existing messages are carried forward unchanged.
    - `content` string, required
    - `style` 'NONE' | 'INFO' | 'WARNING' | 'SUCCESS' | 'ERROR': Visual style for this message. Defaults to NONE if omitted.
  - `status` 'SUCCEEDED' | 'FAILED' | 'COMPLETED_WITH_WARNINGS': Transition the session to a terminal status (SUCCEEDED, FAILED, or COMPLETED_WITH_WARNINGS).
  - `timeoutSeconds` integer: New timeout in seconds. Must be greater than or equal to the current timeout.

## Response `200`

OK

- 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/c9f087b98b8b?raw)
