Skip to content

Arrange running windows ​

Arrange windows of profiles that are already running. This does not launch stopped profiles.

Definition: ApiFox POST · Checked on 2026-10-21.

Request ​

http
POST /api/arrangeWindows

Use the base URL and api-key shown on the client API screen. All examples use 9000 only as a placeholder port; see Overview for authentication.

JSON body ​

Fields follow the Apifox example; optional behavior is explained in the usage notes.

FieldTypeRequiredDescription
idsinteger[]NoOptional. Limit arrangement to these profiles; omit to arrange all running profiles
monitorIndexintegerNoOptional. Target monitor index, starting at 1; defaults to the main monitor

cURL example ​

bash
curl --request POST 'http://127.0.0.1:9000/api/arrangeWindows' \
  --header 'api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "ids": [
    1,
    2
  ],
  "monitorIndex": 1
}'

Arrange all running profiles ​

bash
curl --request POST 'http://127.0.0.1:9000/api/arrangeWindows' \
  --header 'api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{}'

Response example ​

json
{
  "success": true,
  "data": {
    "arrangedCount": 2,
    "arrangedIds": [
      1,
      2
    ],
    "skipped": [],
    "monitor": {
      "index": 1,
      "main": true,
      "width": 3840,
      "height": 2160
    }
  }
}

Field reference ​

FieldTypeDescription
data.arrangedCountintegerNumber of arranged windows
data.arrangedIdsinteger[]IDs of arranged profiles
data.skippedobject[]Skipped items with id and reason
data.monitorobject / nullMonitor information; may be null without eligible windows
data.monitor.indexinteger1-based monitor index
data.monitor.mainbooleanWhether this is the main monitor
data.monitor.width / heightintegerMonitor width/height

Usage notes ​

  • Current clients support window arrangement on Windows only. macOS/Linux return HTTP 501; do not retry it as a network failure.
  • Omit the body or send {} to arrange all running profiles on the main monitor. ids: [] is an empty selection, not the same as omitting ids.
  • ids accepts up to 1000 entries; stopped profiles are skipped. monitorIndex is a 1-based monitor index.
  • Inspect arrangedCount, arrangedIds, and skipped rather than treating success as proof that every window was arranged. With no eligible profiles, a successful result can contain 0 and monitor: null.

Common errors ​

HTTP statuscodeDescription
400INVALID_MONITOR_INDEXMonitor index is out of range; other invalid input also returns 400
409NO_MONITORS / BROWSER_WINDOWS_NOT_READYNo monitors detected or windows not ready
501WINDOW_ARRANGEMENT_UNSUPPORTEDWindow arrangement is unsupported on this platform

For failed requests, check both HTTP status and the error body. See Errors & troubleshooting.