Skip to main content
POST
Create a session

Authorizations

Authorization
string
header
required

A workspace API key from Settings → API keys in the dashboard (https://app.driver.dev), sent as a bearer token.

Body

application/json
nodeId
string

The ID of the node to create a session on. Optional. If not provided, a random node will be selected. If provided, it takes precedence over country and type.

Example:

"this-node-id"

country
string

Two-letter country code used for placement and locale coherence. Defaults to US unless a SOCKS5 URL is supplied with neither language nor timezone, in which case Driver derives the country from the proxy exit. A supplied country must match that resolved exit. Driver otherwise selects a plausible primary language and dominant regional timezone.

Required string length: 2
Example:

"US"

type
enum<string>
default:hosted

Browser execution class. hosted is the native browser, hosted_stealth applies the conservative stealth policy, and hosted_privacy the aggressive one. Defaults to hosted.

Available options:
hosted,
hosted_stealth,
hosted_privacy
Example:

"hosted_privacy"

url
string

Initial URL opened by the browser after launch. Optional. Opened right after launch.

Minimum string length: 1
Example:

"https://example.com"

proxyUrl
string

Explicit SOCKS5 or SOCKS5H URL for the session. A SOCKS URL supplied without language or timezone is geolocated before launch; Driver derives or validates country and uses the exit timezone. When omitted, the session egresses from Driver's ISP network in the requested country. HTTP proxies are not supported. One of the workspace's dedicated IPs is named here as dedicated://, dedicated://any or dedicated://any~country-XX; Driver resolves it to the address's own SOCKS URL and takes the country and timezone from it.

Example:

"socks5://user:[email protected]:1080"

windowSize
string

Outer browser-window size in WIDTHxHEIGHT format. Width must be 320–16384 and height 200–16384.

Example:

"1920x1040"

displaySize
string

Virtual display size in WIDTHxHEIGHT format. Width must be 320–16384 and height 200–16384.

Example:

"1920x1080"

timezone
string

IANA timezone for the browser. It must be listed for the selected country. When omitted, Driver selects a dominant regional timezone and, where Driver runs a managed network there, routes the session through that region.

Required string length: 1 - 128
Example:

"America/New_York"

language
string

BCP-47 browser language listed for the selected country. US sessions accept only en-US and omit both language launch fields so the browser uses its built-in en-US default. For other countries, Driver deterministically chooses the likely primary language the browser supports. Hosted sessions provision matching TTS when available; otherwise Web Speech is disabled for coherence.

Required string length: 2 - 64
Example:

"en-US"

duration
integer

The duration of the browser session in seconds. Optional. Default is 3600 seconds (1 hour). Cannot be greater than 3600 seconds (1 hour). Cannot be less than 60 seconds (1 minute).

Required range: 60 <= x <= 3600
Example:

600

profile
object

A named full browser profile. Persistent profiles are kept between sessions.

adblock
boolean

Whether to enable ad-blocking in the browser session. Optional. Default is false.

Example:

true

captchaSolver
boolean

Whether to enable the built-in CAPTCHA solver for the session. Optional. Default is false.

Example:

true

extensionIds
string[]

Internal extension IDs returned by the extensions API. Requires account-level extension access.

Example:
browserCheck
boolean

Whether to run a browser validation check during session creation. Optional. Default is false.

Example:

false

note
string

An optional note to attach to the session. Maximum 256 characters.

Maximum string length: 256
Example:

"Scraping product pages for client X"

Response

Successfully created a browser session.

sessionId
string
required

The session id: an opaque string; do not validate its format.

status
enum<string>
required

The status of the session.

Available options:
starting,
active,
completed,
error
servedBy
string
required

The node ID that is serving this session.

createdAt
string
required

The ISO 8601 timestamp when the session was created.

stoppedAt
string | null
required

The ISO 8601 timestamp when the session was stopped, or null if it is still active.

cdpUrl
string<uri> | null
required

The URL to access the Chrome DevTools Protocol for this session, or null if not available.

note
string | null
required

An optional note attached to the session, or null if not set.