Browser Window API
This article details the cloud management APIs for browser windows, covering creation, editing, deletion, batch operations, proxy configuration, and other functions. It also explains the unified request and response format and permission requirements, suitable for developers to integrate.
This document explains the browser window API. Cloud APIs handle CRUD operations for window configurations, while the local Local API is used to open and close browser windows, and can also forward some cloud API requests.
API Description
- All requests use the
POSTmethod. - Request parameters are sent as JSON body.
- For cloud APIs, we recommend passing the login state via
Authorization: Bearer {auth}. - The Local API only listens on
127.0.0.1, with the default port54345. The actual port and access token are displayed on the client's "System Settings / Local API" page. - The Local API uses
X-Cos-Local-Tokento pass the local access token and requires the client to be logged in. - The response format is unified as
code/msg/data. pagestarts from0, where0represents the first page.- Deleting a window moves it to the recycle bin during the first phase by default.
Cloud API unified request headers:
Content-Type: application/json
Authorization: Bearer {auth}
Local API unified request headers:
Content-Type: application/json
X-Cos-Local-Token: <local access token>
Unified response:
{
"data": {},
"code": 0,
"msg": "success"
}
Common Local API status codes:
| code | Description |
|---|---|
0 | Request successful |
211 | Missing parameter or unsupported parameter combination |
401 | Client not logged in, or invalid local access token |
404 | API not found |
500 | Local service execution failed |
Create Browser Window
POST /browser/update
If id, browserId, or uuid is not provided, it means creating a window.
Request Example
{
"name": "windows browser",
"groupId": 12,
"tagIds": [3, 5],
"remark": "Created via API",
"proxyMethod": 2,
"proxyType": "socks5",
"host": "1.2.3.4",
"port": 1020,
"proxyUserName": "abc",
"proxyPassword": "def",
"browserFingerPrint": {
"coreVersion": "118",
"ostype": "PC",
"os": "Win32"
}
}
Parameter Details
| Name | Type | Required | Description |
|---|---|---|---|
name | string | No | Window name; backend generates a default name if omitted |
groupId | number/string | No | Group ID; omit or pass 0 for ungrouped |
tagIds | array | No | Tag ID array |
remark | string | No | Window remark |
browserFingerPrint | object | No | Fingerprint configuration object; an empty object {} is allowed |
config | object | No | Full window configuration; optional for cloud API, advanced clients can pass it directly |
proxyMethod | number/string | No | Proxy method: 2 custom proxy, 3 API extracted proxy, 4 proxy management binding |
proxyType | string | No | Proxy type: direct, http, https, socks5, ssh |
host | string | No | Proxy host |
port | number/string | No | Proxy port |
proxyUserName | string | No | Proxy username |
proxyPassword | string | No | Proxy password |
dynamicIpUrl | string | No | API proxy extraction URL |
refreshProxyUrl | string | No | Proxy refresh URL |
ipCheckService | string | No | IP lookup service |
Local API Notes
When creating a window via the Local API, the config field is actually required and cannot be omitted or left as an empty object {}. Otherwise, the following response is returned:
{
"code": 211,
"msg": "Configuration must be a JSON object",
"data": {}
}
If creating a window through Local API, pass a complete non-empty config object; for simple parameter-based creation, it is recommended to call the cloud API directly.
Permission
Requires browser:create:single.
Edit Browser Window
POST /browser/update
Passing id, browserId, or uuid indicates editing a window.
Request Example
{
"id": 101,
"name": "Modified window name",
"groupId": 15,
"remark": "Modified remark",
"tagIds": [3, 8]
}
Local API Notes
When editing a window via the Local API, /browser/update also requires a complete config object. If you only need to modify metadata like name, group, remark, or tags, it's recommended to use /browser/update/partial instead.
Permission
Requires browser:update:single.
Update Specific Window Fields with Batch Support
POST /browser/update/partial
Send only the fields that need updating.
For proxy changes, prefer using /browser/proxy/update.
Request Example
{
"ids": [101, 102],
"name": "Batch renamed",
"groupId": 15,
"remark": "New remark",
"tagIds": [3, 8]
}
Parameter Details
| Name | Type | Required | Description |
|---|---|---|---|
ids | array | Yes | Array of window IDs |
name | string | No | Window name |
groupId | number/string | No | Group ID |
remark | string | No | Remark |
tagIds | array | No | Tag ID array; replaces current tags |
browserFingerPrint | object | No | Fingerprint fields |
config | object | No | Configuration fields |
Permission
- Single window:
browser:update:single - Multiple windows:
browser:update:batch
Get Browser Window Details
POST /browser/detail
Request Example
{
"id": 101
}
Alternatively:
{
"uuid": "550e8400-e29b-41d4-a716-446655440000"
}
Parameter Details
| Name | Type | Required | Description |
|---|---|---|---|
id | number/string | No | Numeric window ID; when using Local API, prefer uuid |
browserId | number/string | No | Compatibility field; when using Local API, prefer uuid |
uuid | string | No | Window UUID, recommended |
At least one of id, browserId, or uuid must be provided.
Local API Notes
- When querying details via Local API, using a numeric
idmay returncode: 211,msg: "UUID invalid". - If
id,browserId, oruuidis missing, Local API may also returnmsg: "UUID invalid"; callers should validate parameters beforehand. - For Local API compatibility, prefer passing
uuid.
Permission
Requires browser:list.
Paginated Browser Window List
POST /browser/list
Request Example
{
"page": 0,
"pageSize": 20,
"groupId": 12
}
Parameter Details
| Name | Type | Required | Description |
|---|---|---|---|
page | number | No | Page number, starts from 0 |
pageSize | number | No | Items per page, backend default paging applied if omitted |
groupId | number/string | No | Group ID |
keyword | string | No | Search keyword |
name | string | No | Window name search |
remark | string | No | Remark search |
Permission
Requires browser:list.
Delete Browser Window
POST /browser/delete
First-phase deletion moves the window to the recycle bin by default.
Request Example
{
"id": 101
}
Parameter Details
| Name | Type | Required | Description |
|---|---|---|---|
id | number/string | No | Window ID |
browserId | number/string | No | Compatibility field |
uuid | string | No | Window UUID |
ids | array | No | Batch delete window IDs |
Permission
Requires browser:delete:recycle.
Batch Delete Browser Windows
POST /browser/delete/ids
Request Example
{
"ids": [101, 102]
}
Permission
Requires browser:delete:recycle.
Batch Update Browser Window Group
POST /browser/group/update
Request Example
{
"ids": [101, 102],
"groupId": 15
}
Parameter Details
| Name | Type | Required | Description |
|---|---|---|---|
ids | array | Yes | Array of window IDs |
groupId | number/string | Yes | Target group ID |
Permission
- Single window:
browser:update:single - Multiple windows:
browser:update:batch
Batch Update Window Remarks
POST /browser/remark/update
Request Example
{
"ids": [101, 102],
"remark": "Remark info"
}
Parameter Details
| Name | Type | Required | Description |
|---|---|---|---|
ids | array | Yes | Array of window IDs |
remark | string | Yes | Remark information |
Permission
- Single window:
browser:update:single - Multiple windows:
browser:update:batch
Batch Update Window Proxy Settings
POST /browser/proxy/update
Sets the same proxy configuration for multiple windows in batch.
Request Example
{
"ids": [101, 102],
"ipCheckService": "ip-api",
"proxyMethod": 2,
"proxyType": "socks5",
"host": "127.0.0.1",
"port": 1080,
"proxyUserName": "user",
"proxyPassword": "pass",
"refreshProxyUrl": ""
}
Parameter Details
| Name | Type | Required | Description |
|---|---|---|---|
ids | array | Yes | Array of window IDs |
proxyMethod | number/string | Yes | Proxy method: 2 custom proxy, 3 API extracted proxy, 4 proxy management binding |
proxyType | string | No | Proxy type: direct, http, https, socks5, ssh |
host | string | No | Proxy host |
port | number/string | No | Proxy port |
proxyUserName | string | No | Proxy username |
proxyPassword | string | No | Proxy password |
refreshProxyUrl | string | No | Proxy refresh URL |
dynamicIpUrl | string | No | IP extraction URL |
dynamicIpChannel | string | No | IP extraction provider |
isDynamicIpChangeIp | boolean | No | Whether to extract a new IP on each open |
ipCheckService | string | No | IP checking service |
enableSocks5Udp | boolean | No | SOCKS5 UDP support |
Notes:
- Only saves cloud configuration in the first phase.
- Does not open the browser.
- Does not check local ports.
- Does not read runtime cookies.
Permission
- Single window:
browser:update:single - Multiple windows:
browser:update:batch
Open Browser Window
POST /browser/open
This endpoint is part of the Local API and opens a browser window. Full request URL example:
POST http://127.0.0.1:54345/browser/open
Request Example
{
"uuid": "browser-config-uuid"
}
Parameter Details
| Name | Type | Required | Description |
|---|---|---|---|
uuid | string | Choose one from id | Browser window configuration UUID; recommended |
config_uuid | string | Choose one from id | Compatible alias for uuid |
browserUuid | string | Choose one from id | Compatible alias for uuid |
browser_uuid | string | Choose one from id | Compatible alias for uuid |
id | string/number | Choose one from uuid | Browser window ID |
browserId | string/number | Choose one from uuid | Compatible alias for id |
browser_id | string/number | Choose one from uuid | Compatible alias for id |
This endpoint supports opening only one window at a time. Passing multiple ids or uuids will return code: 211.
Success Response Example
{
"code": 0,
"msg": "Browser opened",
"data": {
"id": "123",
"browserId": "123",
"uuid": "browser-config-uuid",
"pid": 45678,
"alreadyStarted": false,
"profileDir": "C:\\Users\\...\\browser-cache\\firefox-profiles\\...",
"configPath": "C:\\Users\\...\\firefox-launch-configs\\browser-config-uuid.json",
"openedStatus": {
"beforeStart": {},
"afterStart": {}
}
}
}
Execution Behavior
The API performs the following steps for the currently logged-in account:
- Read window details.
- Call the server launch endpoint to obtain launch configuration.
- Parse proxy configuration; if the window uses API proxy extraction, it fetches the extraction URL first.
- Prepare local Firefox profile directory.
- Start the Firefox browser window.
- Sync open status with the server.
Permission
Requires the client to be logged in and provide a valid X-Cos-Local-Token.
Close Browser Window
POST /browser/close
This endpoint is part of the Local API and closes an already open browser window. Full request URL example:
POST http://127.0.0.1:54345/browser/close
Request Example
{
"uuid": "browser-config-uuid"
}
Parameter Details
| Name | Type | Required | Description |
|---|---|---|---|
uuid | string | Choose one from id | Browser window configuration UUID; recommended |
config_uuid | string | Choose one from id | Compatible alias for uuid |
browserUuid | string | Choose one from id | Compatible alias for uuid |
browser_uuid | string | Choose one from id | Compatible alias for uuid |
id | string/number | Choose one from uuid | Browser window ID |
browserId | string/number | Choose one from uuid | Compatible alias for id |
browser_id | string/number | Choose one from uuid | Compatible alias for id |
This endpoint supports closing only one window at a time. Passing multiple ids or uuids will return code: 211.
Success Response Example
{
"code": 0,
"msg": "Browser closed",
"data": {
"id": "123",
"browserId": "123",
"uuid": "browser-config-uuid",
"close": {
"error": 0,
"killed": false,
"profileZipPath": "C:\\Users\\...\\uploaded-profile-zips\\browser-config-uuid.zip",
"profileZipName": "browser-config-uuid.zip",
"profileZipSize": 102400
},
"cookies": {},
"backendClose": {},
"openedStatus": {
"beforeClose": {},
"afterClose": {}
}
}
}
Execution Behavior
The API performs the following steps for the currently logged-in account:
- Read window details.
- Update server open status to "closing".
- Close the local Firefox process.
- Package local profile data according to window sync configuration.
- If the window has
syncCookiesenabled, attempt to read Firefox exported cookies and sync them to server configuration. - Call the server close endpoint.
- Update server open status to "closed".
The close response includes local profile ZIP information in data.close. The current Local API does not execute additional frontend official/custom cache upload pipelines.
Permission
Requires the client to be logged in and provide a valid X-Cos-Local-Token.
Local Runtime APIs Not Covered in This Document
The following APIs depend on local browser processes, debugging ports, or automation environments and are not expanded here:
| Endpoint | Reason |
|---|---|
/browser/pids | Depends on local processes |
/browser/ports | Depends on local debugging ports |
/browser/cookies | Depends on local browser runtime |
/windowbounds | Depends on native window management |
/rpa/* | Depends on local automation environment |