---
title: "Update a session"
method: PATCH
path: "/v1/browser_sessions/{browser_session_id}"
tags: ["Browser Sessions"]
---

# Update a session

`PATCH /v1/browser_sessions/{browser_session_id}`

Update a live browser session. Currently supports toggling generate_browser_profile, which is read when the session ends to decide whether to save its browser profile.

## Path parameters

- `browser_session_id` string, required — The ID of the browser session. browser_session_id starts with `pbs_`

## Headers

- `x-api-key` string, nullable — Skyvern API key for authentication. API key can be found at https://app.skyvern.com/settings.

## Request body

- UpdateBrowserSessionRequest
  - `generate_browser_profile` boolean, required — Enable or disable saving this session's browser profile when it ends. Can be toggled while the session is still alive; the value is read at session teardown.

## Response `200`

Successfully updated browser session

- BrowserSessionResponse — Response model for browser session information.
  - `browser_session_id` string, required — Unique identifier for the browser session. browser_session_id starts with `pbs_`.
  - `organization_id` string, required — ID of the organization that owns this session
  - `status` string, nullable — Current status of the browser session
  - `runnable_type` string, nullable — Type of the current runnable associated with this session (workflow, task etc)
  - `runnable_id` string, nullable — ID of the current runnable
  - `timeout` integer, nullable — Timeout in minutes for the session. Timeout is applied after the session is started. Defaults to 60 minutes.
  - `browser_address` string, nullable — Url for connecting to the browser
  - `app_url` string, nullable — Url for the browser session page
  - `extensions` Extensions[], nullable — A list of extensions installed in the browser session.
  - `browser_type` 'msedge' | 'chrome' | 'stealth-chromium'
  - `browser_profile_id` string, nullable — ID of the browser profile loaded into this session, if any. browser_profile_id starts with `bp_`.
  - `generate_browser_profile` boolean — Whether this session's browser profile will be saved when it ends so it can become a reusable browser profile.
  - `vnc_streaming_supported` boolean — Whether the browser session supports VNC streaming
  - `stream_transport` string, nullable — Live-view transport for this session: "vnc" or "cdp". Resolved on the single-session fetch only; null elsewhere.
  - `download_path` string, nullable — The path where the browser session downloads files
  - `downloaded_files` FileInfo[], nullable — The list of files downloaded by the browser session
    - `url` string, required — URL to access the file
    - `checksum` string, nullable — SHA-256 checksum of the file
    - `filename` string, nullable — Original filename
    - `file_size` integer, nullable — Size of the file in bytes
    - `modified_at` string, date-time, nullable — Modified time of the file
    - `artifact_id` string, nullable — Artifact row id for refresh-on-read
  - `recordings` FileInfo[], nullable — The list of video recordings from the browser session
    - `url` string, required — URL to access the file
    - `checksum` string, nullable — SHA-256 checksum of the file
    - `filename` string, nullable — Original filename
    - `file_size` integer, nullable — Size of the file in bytes
    - `modified_at` string, date-time, nullable — Modified time of the file
    - `artifact_id` string, nullable — Artifact row id for refresh-on-read
  - `started_at` string, date-time, nullable — Timestamp when the session was started
  - `completed_at` string, date-time, nullable — Timestamp when the session was completed
  - `created_at` string, date-time, required — Timestamp when the session was created (the timestamp for the initial request)
  - `modified_at` string, date-time, required — Timestamp when the session was last modified
  - `deleted_at` string, date-time, nullable — Timestamp when the session was deleted, if applicable

## Other responses

- `403` — Unauthorized - Invalid or missing authentication
- `404` — Browser session not found
- `409` — Conflict - browser session has already ended and can no longer be updated
- `422` — Validation Error

---

[API](https://skmtc.net/skyvern-ai/apis/skyvern-api-2.md) · [All operations](https://skmtc.net/skyvern-ai/apis/skyvern-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/skyvern-ai/skyvern-api-2/revisions/5116249dfff3/schema)
