v7

latestOpenAPI 3.1.0raw.githubusercontent.com2025-03-27193380.5 KB
Sessions

Fleet Websocket Session Create Endpoint

post/sessions/create

Request body

raccoon_passcodestring nullable

The raccoon passcode associated with the end user on behalf of which the call is being made if any.

urlstring nullable

The entrypoint url for the session.

browser_type'chromium' | 'firefox' | 'webkit' nullable

The type of browser to use. Supported values include 'chromium', 'firefox', and 'webkit'.

headlessboolean nullable

Whether to run the browser in headless mode.

session_timeoutinteger nullable

The timeout for the browser session in seconds.

Example request

{
  "raccoon_passcode": "<end-user-raccoon-passcode>",
  "url": "https://www.google.com",
  "browser_type": "chromium",
  "settings": {
    "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
    "viewport": {
      "height": 720,
      "width": 1280
    },
    "locales": [
      "en-US",
      "fr-FR"
    ]
  },
  "advanced": {
    "block_ads": true,
    "solve_captchas": true,
    "proxy": {
      "country": "us",
      "city": "sanfrancisco",
      "state": "ca",
      "zip": 90210
    },
    "extension_ids": [
      "df2399ea-a938-438f-9d4b-ef3bc95cf8af"
    ]
  },
  "headless": true,
  "session_timeout": 600
}

Response

Successful Response

session_idstring required

A unique identifier for the created session.

websocket_urlstring required

The WebSocket URL for interacting with the session.

livestream_urlstring required

The Livestream URL

status'starting' | 'running' | 'terminated' | 'completed' | 'unknown' | 'success' | 'failure' required

The current status of the session.

Example response

{
  "session_id": "session_12345",
  "websocket_url": "wss://connect.raccoonai.tech/ws/6000?sessionId=session_12345",
  "livestream_url": "https://api.raccoonai.tech/sessions/session_12345/stream?enable_actions=true&theme=dark",
  "status": "running"
}
All 19 operations