Skip to content

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.

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 os
from alter_sdk import App
from 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()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.browser_session_idstringRequired within parentThe ID of the browser session. browser_session_id starts with `pbs_`
bodyModelRequired within parentExpand Update a session — request body — body

Referenced models: Update a session — request body — body

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Get a session — response body

Referenced models: Get a session — response body

1 more schema is linked from the tables above, on the schema pages.

Get a session — response body
FieldTypePresenceDescription and constraints
$objectRootResponse model for browser session information.
app_urlJSONOptionalUrl for the browser session page
app_url (anyOf 1)stringAlternative
app_url (anyOf 2)nullAlternative
browser_addressJSONOptionalUrl for connecting to the browser
browser_address (anyOf 1)stringAlternative
browser_address (anyOf 2)nullAlternative
browser_profile_idJSONOptionalID of the browser profile loaded into this session, if any. browser_profile_id starts with `bp_`.
browser_profile_id (anyOf 1)stringAlternative
browser_profile_id (anyOf 2)nullAlternative
browser_session_idstringRequired within parentUnique identifier for the browser session. browser_session_id starts with `pbs_`.
browser_settingsJSONOptionalBrowser settings requested when the session was created.
browser_settings (anyOf 1)ModelAlternativeExpand Get a session — response body — browser settings timezone id
browser_settings (anyOf 2)nullAlternative
browser_settings_receiptJSONOptionalWhat 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)ModelAlternativeExpand Login Task — response body — browser_settings_receipt / source: workflow version, session request, existing session, status: verified, mismatch, unapplied, unknown
browser_settings_receipt (anyOf 2)nullAlternative
browser_typeJSONOptionalThe type of browser used for the session.
browser_type (anyOf 1)stringAlternativeKnown values: msedge, chrome, stealth-chromium
browser_type (anyOf 2)nullAlternative
completed_atJSONOptionalTimestamp when the session was completed
completed_at (anyOf 1)stringAlternativeFormat: date-time
completed_at (anyOf 2)nullAlternative
created_atstringRequired within parentTimestamp when the session was created (the timestamp for the initial request)
Format: date-time
created_byJSONOptionalID of the user who created the session
created_by (anyOf 1)stringAlternative
created_by (anyOf 2)nullAlternative
deleted_atJSONOptionalTimestamp when the session was deleted, if applicable
deleted_at (anyOf 1)stringAlternativeFormat: date-time
deleted_at (anyOf 2)nullAlternative
download_pathJSONOptionalThe path where the browser session downloads files
download_path (anyOf 1)stringAlternative
download_path (anyOf 2)nullAlternative
downloaded_filesJSONOptionalThe list of files downloaded by the browser session
downloaded_files (anyOf 1)arrayAlternative
downloaded_files (anyOf 1)[]ModelEach itemExpand Get a session — response body — recordings array item
downloaded_files (anyOf 2)nullAlternative
extensionsJSONOptionalA list of extensions installed in the browser session.
extensions (anyOf 1)arrayAlternative
extensions (anyOf 1)[]stringEach itemKnown values: ad-blocker, captcha-solver
extensions (anyOf 2)nullAlternative
generate_browser_profilebooleanOptionalWhether this session's browser profile will be saved when it ends so it can become a reusable browser profile.
Default: false
modified_atstringRequired within parentTimestamp when the session was last modified
Format: date-time
organization_idstringRequired within parentID of the organization that owns this session
recordingsJSONOptionalThe list of video recordings from the browser session
recordings (anyOf 1)arrayAlternative
recordings (anyOf 1)[]ModelEach itemExpand Get a session — response body — recordings array item
recordings (anyOf 2)nullAlternative
remaining_lifetime_secondsJSONOptionalSeconds left before a registered external browser's fixed deadline. Null for managed sessions and once the session has ended.
remaining_lifetime_seconds (anyOf 1)JSONAlternative
remaining_lifetime_seconds (anyOf 1) (anyOf 1)integerAlternative
remaining_lifetime_seconds (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
remaining_lifetime_seconds (anyOf 2)nullAlternative
runnable_idJSONOptionalID of the current runnable
runnable_id (anyOf 1)stringAlternative
runnable_id (anyOf 2)nullAlternative
runnable_typeJSONOptionalType of the current runnable associated with this session (workflow, task etc)
runnable_type (anyOf 1)stringAlternative
runnable_type (anyOf 2)nullAlternative
sourcestringOptional"external" for a browser the caller registered and runs itself; "managed" for one Skyvern runs.
Known values: managed, external
Default: managed
started_atJSONOptionalTimestamp when the session was started
started_at (anyOf 1)stringAlternativeFormat: date-time
started_at (anyOf 2)nullAlternative
statusJSONOptionalCurrent status of the browser session
status (anyOf 1)stringAlternative
status (anyOf 2)nullAlternative
stream_transportJSONOptionalLive-view transport for this session: "vnc" or "cdp". Resolved on the single-session fetch only; null elsewhere.
stream_transport (anyOf 1)stringAlternative
stream_transport (anyOf 2)nullAlternative
timeoutJSONOptionalTimeout in minutes for the session. Timeout is applied after the session is started. Defaults to 60 minutes.
timeout (anyOf 1)JSONAlternative
timeout (anyOf 1) (anyOf 1)integerAlternative
timeout (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
timeout (anyOf 2)nullAlternative
vnc_streaming_supportedbooleanOptionalWhether the browser session supports VNC streaming
Default: false
warningJSONOptionalAdvisory 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)stringAlternative
warning (anyOf 2)nullAlternative

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
FieldTypePresenceDescription and constraints
$objectRoot
generate_browser_profilebooleanRequired within parentEnable 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
FieldTypePresenceDescription and constraints
$objectRoot
timezone_idJSONOptionalIANA 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)stringAlternative
timezone_id (anyOf 2)nullAlternative
Login Task — response body — browser_settings_receipt / source: workflow version, session request, existing session, status: verified, mismatch, unapplied, unknown
FieldTypePresenceDescription and constraints
$objectRoot
actual_timezone_idJSONOptionalThe timezone the browser reported when measured, or null when it could not be measured.
actual_timezone_id (anyOf 1)stringAlternative
actual_timezone_id (anyOf 2)nullAlternative
requested_timezone_idstringRequired within parentThe timezone that was requested.
sourcestringRequired within parentWhere the requested setting came from.
Known values: workflow_version, session_request, existing_session
statusstringRequired 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
warningJSONOptional
warning (anyOf 1)stringAlternative
warning (anyOf 2)nullAlternative

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.

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.