# sessions.list

`GET /api/public/v1/sessions`

Open sessions (scope=live) or the last 7 days (scope=recent), optionally for one profile.

- Capability: `session.read`
- Command: no
- MCP tool: `sessions_list`

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `scope` | query | "live" \| "recent" | no | Default: `"live"`. |
| `profile` | query | string (uuid) | no | Only this profile |

## Response

`200` with `{ data, correlation_id }`.

| Field | Type | Always present | Description |
|---|---|---|---|
| `data` | array<object> | yes |  |
| `data[].id` | string (uuid) | yes |  |
| `data[].lifecycle` | "queued" \| "preflight" \| "starting" \| "ready" \| "quiescing" \| "stopping" \| "closed" \| "failed" \| … | yes |  |
| `data[].control` | "free" \| "reserved" \| "controlled" \| "handoff_pending" \| "revoked" \| "uncertain" | yes |  |
| `data[].connectivity` | "connected" \| "reconnecting" \| "offline" \| "unknown" | yes |  |
| `data[].network` | "unchecked" \| "checking" \| "healthy" \| "unhealthy" \| "unknown" | yes |  |
| `data[].sync` | "clean" \| "dirty" \| "snapshotting" \| "upload_pending" \| "committing" \| "committed" \| "conflict" \| "failed" | yes |  |
| `data[].fence` | integer | yes | Increments every time the profile is opened; stale reports carry an older fence (min -9007199254740991, max 9007199254740991) |
| `data[].revision` | integer | yes | (min -9007199254740991, max 9007199254740991) |
| `data[].headless` | boolean | yes |  |
| `data[].profile` | object | yes |  |
| `data[].profile.id` | string (uuid) | yes |  |
| `data[].profile.os` | "windows" \| "linux" | yes |  |
| `data[].profile.name` | string | yes |  |
| `data[].profile.number` | integer | yes | (min -9007199254740991, max 9007199254740991) |
| `data[].profile.group_id` | string (uuid) \| null | yes |  |
| `data[].profile.revision` | integer | yes | (min -9007199254740991, max 9007199254740991) |
| `data[].device` | object | yes |  |
| `data[].device.id` | string (uuid) | yes |  |
| `data[].device.os` | "windows" \| "linux" | yes |  |
| `data[].device.name` | string | yes |  |
| `data[].device.state` | string | yes |  |
| `data[].device.freshness` | string | yes |  |
| `data[].lease` | object \| null | yes | The machine's hold on the profile while the session runs (not an app hold — see sessions.acquire) |
| `data[].lease.expires_at` | string (date-time) | yes |  |
| `data[].lease.expired` | boolean | yes |  |
| `data[].egress` | object \| null | yes |  |
| `data[].egress.ip` | string | yes |  |
| `data[].egress.checked_at` | string (date-time) | yes |  |
| `data[].process` | object \| null | yes |  |
| `data[].process.pid` | integer | yes | (min -9007199254740991, max 9007199254740991) |
| `data[].runtime` | object \| null | yes |  |
| `data[].runtime.channel` | string | yes |  |
| `data[].runtime.version` | string | yes |  |
| `data[].identity` | object \| null | yes | What the browser actually reported (user agent, languages, timezone, …) |
| `data[].mismatches` | array<object> | yes |  |
| `data[].remote` | object \| null | yes |  |
| `data[].proxy_id` | string (uuid) \| null | yes |  |
| `data[].run_id` | string (uuid) \| null | yes |  |
| `data[].run_target_id` | string (uuid) \| null | yes |  |
| `data[].started_by` | string \| null | yes |  |
| `data[].stopped_by` | string \| null | yes |  |
| `data[].stop_reason` | string \| null | yes |  |
| `data[].reason_code` | string \| null | yes |  |
| `data[].network_reason` | string \| null | yes |  |
| `data[].ready_ms` | integer \| null | yes |  |
| `data[].ready_at` | string (date-time) \| null | yes |  |
| `data[].closed_at` | string (date-time) \| null | yes |  |
| `data[].created_at` | string (date-time) | yes |  |
| `data[].updated_at` | string (date-time) | yes |  |
| `data[].attach_open` | integer | yes | (min -9007199254740991, max 9007199254740991) |
| `data[].pending_changes` | boolean | yes |  |
| `data[].profile_revision` | integer | yes | (min -9007199254740991, max 9007199254740991) |
| `correlation_id` | string (uuid) | yes |  |

New fields can appear at any time; ignore the ones you do not know.

## Errors

| Code | HTTP | Retryable |
|---|---|---|
| `UNAUTHENTICATED` | 401 | no |
| `FORBIDDEN` | 403 | no |
| `RATE_LIMITED` | 429 | yes |
| `VALIDATION_FAILED` | 422 | no |
| `DEPENDENCY_UNAVAILABLE` | 503 | yes |
| `UNKNOWN` | 500 | no |

## Example (curl)

```bash
curl "https://browlix.com/api/public/v1/sessions" \
  -H "Authorization: Bearer $BROWLIX_API_KEY"
```

## Example (TypeScript SDK)

```ts
import { Browlix } from "@browlix/sdk";

const bx = new Browlix({ apiKey: process.env.BROWLIX_API_KEY! });
const reply = await bx.call("sessions.list");
console.log(reply.data);
```

## Example (Python)

```python
import os
import requests

r = requests.get(
    "https://browlix.com/api/public/v1/sessions",
    headers={"Authorization": f"Bearer {os.environ['BROWLIX_API_KEY']}"},
    timeout=60,
)
print(r.status_code, r.json())
```

## Example (MCP)

```json
{
  "method": "tools/call",
  "params": {
    "name": "sessions_list",
    "arguments": {}
  }
}
```
