POST
/
v1
/
sessions
curl --request POST \
  --url https://www.browserbase.com/v1/sessions \
  --header 'Content-Type: application/json' \
  --header 'X-BB-API-Key: <api-key>' \
  --data '{
  "projectId": "<string>",
  "extensionId": "<string>",
  "browserSettings": {
    "fingerprint": {
      "httpVersion": 1,
      "browsers": [
        "chrome"
      ],
      "devices": [
        "desktop"
      ],
      "locales": [
        "<string>"
      ],
      "operatingSystems": [
        "android"
      ],
      "screen": {
        "maxHeight": 123,
        "maxWidth": 123,
        "minHeight": 123,
        "minWidth": 123
      }
    },
    "context": {
      "id": "<string>",
      "persist": true
    },
    "viewport": {
      "width": 123,
      "height": 123
    }
  },
  "timeout": 10830,
  "keepAlive": true
}'
{
  "id": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "projectId": "<string>",
  "startedAt": "2023-11-07T05:31:56Z",
  "endedAt": "2023-11-07T05:31:56Z",
  "expiresAt": "2023-11-07T05:31:56Z",
  "status": "NEW",
  "proxyBytes": 123,
  "avgCpuUsage": 123,
  "memoryUsage": 123,
  "keepAlive": true
}

Authorizations

X-BB-API-Key
string
headerrequired

Body

application/json
projectId
string
required

The Project ID. Can be found in Settings.

extensionId
string

The uploaded Extension ID. See Upload Extension.

browserSettings
object
timeout
integer

Duration in seconds after which the session will automatically end. Defaults to the Project's defaultTimeout.

keepAlive
boolean

Set to true to keep the session alive even after disconnections. This is available on the Startup plan only.

Response

201 - application/json
id
string
required
createdAt
string
required
updatedAt
string
required
projectId
string
required

The Project ID linked to the Session.

startedAt
string
required
endedAt
string
required
expiresAt
string
required
status
enum<string>
required
Available options:
NEW,
CREATED,
RUNNING,
REQUEST_RELEASE,
RELEASING,
ERROR,
TIMED_OUT,
COMPLETED
proxyBytes
integer
required

Bytes used via the Proxy

avgCpuUsage
integer
required

CPU used by the Session

memoryUsage
integer
required

Memory used by the Session

keepAlive
boolean
required

Indicates if the Session was created to be kept alive upon disconnections