---
title: "Fleet Websocket Session Create Endpoint"
method: POST
path: "/sessions/create"
tags: ["Sessions"]
---

# Fleet Websocket Session Create Endpoint

`POST /sessions/create`

## Request

- Base URL: `https://api.raccoonai.tech`
- URL: `https://api.raccoonai.tech/sessions/create`
- Auth: API key in header `raccoon-secret-key`

## Request body

- SessionRequest
  - `raccoon_passcode` string, nullable: The raccoon passcode associated with the end user on behalf of which the call is being made if any.
  - `url` string, 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'.
  - `settings` Settings, nullable
    - `user_agent` string, nullable: The User-Agent string to use for the browser. Defaults to internal auto user-agent rotation mechanism.
    - `viewport` object, nullable: The viewport size (screen dimensions) for the browser in pixels.
    - `locales` string[], nullable: A list of locales or languages to use for the browser session. These determine language preferences.
  - `advanced` Advanced, nullable
    - `block_ads` boolean, nullable: Whether to block advertisements during the browser session.
    - `solve_captchas` boolean, nullable: Whether to attempt automatic CAPTCHA solving.
    - `proxy` union: Proxy details for the browser session. Automatically defaults to True if solve_captchas is on.
      - ProxySettings
        - `country` string, nullable: Target country (2-letter ISO code).
        - `city` string, nullable: Target city.
        - `state` string, nullable: Target state (2-letter code).
        - `zip` integer, nullable: Target postal code.
      - boolean
    - `extension_ids` unknown[], nullable: list of extension ids
      - unknown
  - `headless` boolean, nullable: Whether to run the browser in headless mode.
  - `session_timeout` integer, nullable: The timeout for the browser session in seconds.

## Response `200`

Successful Response

- SessionCreateResponse
  - `session_id` string, required: A unique identifier for the created session.
  - `websocket_url` string, required: The WebSocket URL for interacting with the session.
  - `livestream_url` string, required: The Livestream URL
  - `status` 'starting' | 'running' | 'terminated' | 'completed' | 'unknown' | 'success' | 'failure', required: The current status of the session.

## Other responses

- `422`: Validation Error

## Changes

- **2025-03-18** `cc64732da5aa`: 2 breaking, 3 warning, 6 info
  - the request property `advanced/anyOf[subschema #1: Advanced]/proxy/anyOf[subschema #2]/` became not nullable
  - the `advanced/anyOf[subschema #1: Advanced]/proxy/anyOf[subschema #2]/` request property type changed from `null` to `boolean`
  - removed the request property `advanced/anyOf[subschema #1: Advanced]/proxy/anyOf[subschema #1: ProxySettings]/enable`
  - added the new `failure` enum value to the `status` response property for the response status `200`
  - …7 more
- **2025-03-03** `b0c1c8f44dae`: 2 breaking, 6 warning, 7 info
  - removed `subschema #1` from the `advanced/anyOf[subschema #1: Advanced]/proxy` request property `anyOf` list
  - request property `browser_type/anyOf[subschema #1]/` was restricted to a list of enum values
  - removed the request property `app_name`
  - added the new `completed` enum value to the `status` response property for the response status `200`
  - …11 more

[Operation history](https://skmtc.dev/raccoonaihq/apis/raccoon-ai-api/changes/sessions/create/post.md)

---

[API](https://skmtc.dev/raccoonaihq/apis/raccoon-ai-api.md) - [All operations](https://skmtc.dev/raccoonaihq/apis/raccoon-ai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/raccoonaihq/apis/raccoon-ai-api/revisions/cc64732da5aa?raw)
