Skip to content
Local APIBrowser profiles

Start a browser profile ​

Version overview
POST
/api/v1/browsers/start

Start a browser profile for the current user and team. Profiles that are already active or starting still undergo ownership checks using the current login session, but no duplicate process is created. url opens in a new tab after startup. An explicit headless value takes precedence; otherwise, the profile command_line setting is used. window_state is ignored in headless mode. window_state=last restores the window dimensions from the previous session.

Request parameters

Authorization Bearer Token

Include your API Key as a Bearer token in the Authorization request header.

Authorization: Bearer <api-key>

Body parameters

requiredapplication/jsonBrowserStartRequest
Fields
stringrequired
Unique browser profile ID
Example"env_01JABCDEF1234567890"
minLength: 1
string
HTTP(S) URL to open in a new tab after starting or reusing the profile
format: "uri"
string
Override the startup window dimensions/state in the local client configuration. normal uses the profile window dimensions; last restores the dimensions from the previous session; minimized means minimized; maximized means maximized. Ignored in headless mode.
Enum
boolean
Explicitly override headless mode. If omitted, the --headless configuration in the profile command_line is used.
Example

Generated from the schema; not a live response.

{
  "env_id": "env_01JABCDEF1234567890"
}

Request code examples

JavaScript / TypeScript: Node.js 18+ with fetch; PHP: cURL extension; Go: 1.16+; Java: JDK 11+. Replace the token and example parameter values before running.

curl -X POST -H 'Authorization: Bearer <TOKEN>' -H 'Content-Type: application/json' -d '{
  "env_id": "env_01JABCDEF1234567890"
}' 'http://local.zhongyibrowser.com:39025/api/v1/browsers/start'

Responses

Success: code = 0. Failure: code > 0. Select a status to view its fields and example. Expand objects to inspect nested fields. Optional fields may be omitted.

Browser startup or reuse result

Body

application/jsonBrowserStartSuccessResponse
Fields
numberrequired
Business status code; always 0 on success
Enum
stringrequired
Business status message; always success on success
Enum
objectrequired
Endpoint business data

Additional fields are not allowed.

Example

Generated from the schema; not a live response.

{
  "code": 0,
  "message": "success",
  "data": {
    "env_id": "env_01JABCDEF1234567890",
    "group": {
      "id": "string",
      "name": "string"
    },
    "status": "active",
    "headless": true,
    "ws_endpoint": "string",
    "reused": true
  }
}

View all business error codes and HTTP statuses

ZYBrowser Local API documentation