Skyvern: Update a session
Skyvern browserSessions.updateBrowserSession: arguments, response, policy and SDK examples.
← Browser sessions operations · Get started
Operation skyvern.update_browser_session_v1_browser_sessions_browser_session_id_patch
Provider route: PATCH /v1/browser_sessions/{browser_session_id}. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/skyvern with npm, or alter-sdk-skyvern with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { SkyvernIntegration } from "@alter-ai/skyvern";
async function execute(input: Parameters<SkyvernIntegration["browserSessions"]["updateBrowserSession"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new SkyvernIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.browserSessions.updateBrowserSession(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_skyvern import SkyvernIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = SkyvernIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.browser_sessions.update_browser_session(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.browser_session_id | string | Required within parent | The ID of the browser session. browser_session_id starts with `pbs_` |
body | Model | Required within parent | Expand Update a session — request body — body |
Referenced models: Update a session — request body — body
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Get a session — response body |
Referenced models: Get a session — response body
Schemas
Section titled “Schemas”1 more schema is linked from the tables above, on the schema pages.
Get a session — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Response model for browser session information. |
app_url | JSON | Optional | Url for the browser session page |
app_url (anyOf 1) | string | Alternative | |
app_url (anyOf 2) | null | Alternative | |
browser_address | JSON | Optional | Url for connecting to the browser |
browser_address (anyOf 1) | string | Alternative | |
browser_address (anyOf 2) | null | Alternative | |
browser_profile_id | JSON | Optional | ID of the browser profile loaded into this session, if any. browser_profile_id starts with `bp_`. |
browser_profile_id (anyOf 1) | string | Alternative | |
browser_profile_id (anyOf 2) | null | Alternative | |
browser_session_id | string | Required within parent | Unique identifier for the browser session. browser_session_id starts with `pbs_`. |
browser_settings | JSON | Optional | Browser settings requested when the session was created. |
browser_settings (anyOf 1) | Model | Alternative | Expand Get a session — response body — browser settings timezone id |
browser_settings (anyOf 2) | null | Alternative | |
browser_settings_receipt | JSON | Optional | What the browser reported after launch for the requested settings. Null until it is measured, and always null when no settings were requested. |
browser_settings_receipt (anyOf 1) | Model | Alternative | Expand Login Task — response body — browser_settings_receipt / source: workflow version, session request, existing session, status: verified, mismatch, unapplied, unknown |
browser_settings_receipt (anyOf 2) | null | Alternative | |
browser_type | JSON | Optional | The type of browser used for the session. |
browser_type (anyOf 1) | string | Alternative | Known values: msedge, chrome, stealth-chromium |
browser_type (anyOf 2) | null | Alternative | |
completed_at | JSON | Optional | Timestamp when the session was completed |
completed_at (anyOf 1) | string | Alternative | Format: date-time |
completed_at (anyOf 2) | null | Alternative | |
created_at | string | Required within parent | Timestamp when the session was created (the timestamp for the initial request) Format: date-time |
created_by | JSON | Optional | ID of the user who created the session |
created_by (anyOf 1) | string | Alternative | |
created_by (anyOf 2) | null | Alternative | |
deleted_at | JSON | Optional | Timestamp when the session was deleted, if applicable |
deleted_at (anyOf 1) | string | Alternative | Format: date-time |
deleted_at (anyOf 2) | null | Alternative | |
download_path | JSON | Optional | The path where the browser session downloads files |
download_path (anyOf 1) | string | Alternative | |
download_path (anyOf 2) | null | Alternative | |
downloaded_files | JSON | Optional | The list of files downloaded by the browser session |
downloaded_files (anyOf 1) | array | Alternative | |
downloaded_files (anyOf 1)[] | Model | Each item | Expand Get a session — response body — recordings array item |
downloaded_files (anyOf 2) | null | Alternative | |
extensions | JSON | Optional | A list of extensions installed in the browser session. |
extensions (anyOf 1) | array | Alternative | |
extensions (anyOf 1)[] | string | Each item | Known values: ad-blocker, captcha-solver |
extensions (anyOf 2) | null | Alternative | |
generate_browser_profile | boolean | Optional | Whether this session's browser profile will be saved when it ends so it can become a reusable browser profile. Default: false |
modified_at | string | Required within parent | Timestamp when the session was last modified Format: date-time |
organization_id | string | Required within parent | ID of the organization that owns this session |
recordings | JSON | Optional | The list of video recordings from the browser session |
recordings (anyOf 1) | array | Alternative | |
recordings (anyOf 1)[] | Model | Each item | Expand Get a session — response body — recordings array item |
recordings (anyOf 2) | null | Alternative | |
remaining_lifetime_seconds | JSON | Optional | Seconds left before a registered external browser's fixed deadline. Null for managed sessions and once the session has ended. |
remaining_lifetime_seconds (anyOf 1) | JSON | Alternative | |
remaining_lifetime_seconds (anyOf 1) (anyOf 1) | integer | Alternative | |
remaining_lifetime_seconds (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
remaining_lifetime_seconds (anyOf 2) | null | Alternative | |
runnable_id | JSON | Optional | ID of the current runnable |
runnable_id (anyOf 1) | string | Alternative | |
runnable_id (anyOf 2) | null | Alternative | |
runnable_type | JSON | Optional | Type of the current runnable associated with this session (workflow, task etc) |
runnable_type (anyOf 1) | string | Alternative | |
runnable_type (anyOf 2) | null | Alternative | |
source | string | Optional | "external" for a browser the caller registered and runs itself; "managed" for one Skyvern runs. Known values: managed, external Default: managed |
started_at | JSON | Optional | Timestamp when the session was started |
started_at (anyOf 1) | string | Alternative | Format: date-time |
started_at (anyOf 2) | null | Alternative | |
status | JSON | Optional | Current status of the browser session |
status (anyOf 1) | string | Alternative | |
status (anyOf 2) | null | Alternative | |
stream_transport | JSON | Optional | Live-view transport for this session: "vnc" or "cdp". Resolved on the single-session fetch only; null elsewhere. |
stream_transport (anyOf 1) | string | Alternative | |
stream_transport (anyOf 2) | null | Alternative | |
timeout | JSON | Optional | Timeout in minutes for the session. Timeout is applied after the session is started. Defaults to 60 minutes. |
timeout (anyOf 1) | JSON | Alternative | |
timeout (anyOf 1) (anyOf 1) | integer | Alternative | |
timeout (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
timeout (anyOf 2) | null | Alternative | |
vnc_streaming_supported | boolean | Optional | Whether the browser session supports VNC streaming Default: false |
warning | JSON | Optional | Advisory message about how the request was adjusted, if it was. Set when a requested timeout above the maximum was capped at creation, when an extension was granted less than it asked for, or when an extension was accepted but not yet confirmed; null otherwise. |
warning (anyOf 1) | string | Alternative | |
warning (anyOf 2) | null | Alternative |
Referenced models: Get a session — response body — browser settings timezone id, Login Task — response body — browser_settings_receipt / source: workflow version, session request, existing session, status: verified, mismatch, unapplied, unknown, Get a session — response body — recordings array item
Update a session — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
generate_browser_profile | boolean | Required within parent | 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. |
Get a session — response body — browser settings timezone id
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
timezone_id | JSON | Optional | IANA timezone the browser reports to pages, for example `America/New_York`. Applied when a browser is created and takes precedence over any timezone implied by the proxy location. Offsets such as `+03:00` are rejected. Omit or set to null to keep the default behavior. |
timezone_id (anyOf 1) | string | Alternative | |
timezone_id (anyOf 2) | null | Alternative |
Login Task — response body — browser_settings_receipt / source: workflow version, session request, existing session, status: verified, mismatch, unapplied, unknown
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
actual_timezone_id | JSON | Optional | The timezone the browser reported when measured, or null when it could not be measured. |
actual_timezone_id (anyOf 1) | string | Alternative | |
actual_timezone_id (anyOf 2) | null | Alternative | |
requested_timezone_id | string | Required within parent | The timezone that was requested. |
source | string | Required within parent | Where the requested setting came from. Known values: workflow_version, session_request, existing_session |
status | string | Required within parent | `verified` when the browser reported the requested timezone or an IANA alias of it (Chromium reports `Asia/Calcutta` for `Asia/Kolkata`), `mismatch` when it reported another zone, `unapplied` when the browser already existed and was left unchanged, `unknown` when it could not be measured. Known values: verified, mismatch, unapplied, unknown |
warning | JSON | Optional | |
warning (anyOf 1) | string | Alternative | |
warning (anyOf 2) | null | Alternative |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: skyvern.update_browser_session_v1_browser_sessions_browser_session_id_patch. Catalog operation: update_browser_session_v1_browser_sessions__browser_session_id__patch. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.