Laptop
Generated from api/openapi.yaml (OpenAPI 3.1). Base URL: https://api.teemli.com. Auth: Authorization: Bearer <token or tml_ API key>. Errors are application/problem+json; writes accept an Idempotency-Key header.
The device bridge (M4): the person’s desktop app (and, later, browser extension) registers as a device and keeps
a WebSocket open at /v1/devices/ws; agents’ laptop calls are routed to it and run inside the folders the person
granted on the laptop. Connection status, granted folders (shown, managed on the laptop), and the “laptop access”
admin switch. Per-agent Always/Ask/Never is the agent’s laptop_access (PATCH the agent).
My devices, with live status
Section titled “My devices, with live status”GET /v1/orgs/{org}/devicesOnly the caller’s own devices (row-level security: never anyone else’s, not even an admin’s view).
online = the device’s socket is open and it pinged within 90 s. Also returns the organisation’s
“laptop access” switch and whether the caller may change it.
API keys: not available (needs a person signed in to the app).
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
Responses
200Devices — DeviceList401Missing, invalid or expired token — Problem
Register this device (the desktop app on first sign-in)
Section titled “Register this device (the desktop app on first sign-in)”POST /v1/orgs/{org}/devicesReturns the device; the app keeps its id and opens /v1/devices/ws. At most 20 per person.
API keys: not available (needs a person signed in to the app).
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
Request body (JSON)
| Field | Type | Description |
|---|---|---|
kind (required) |
desktop, extension |
|
platform (required) |
macos, windows, linux, chrome, edge |
|
name (required) |
string | e.g. the computer’s name, “Priya’s MacBook Pro” |
app_version |
string | |
os_version |
string |
Responses
201Registered — Device401Missing, invalid or expired token — Problem409Conflicting state (card already answered, duplicate in flight, name taken) — Problem422Invalid input — Problem
Rename a device
Section titled “Rename a device”PATCH /v1/orgs/{org}/devices/{device}API keys: not available (needs a person signed in to the app).
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
device (required) |
path | string (uuid) |
Request body (JSON)
| Field | Type | Description |
|---|---|---|
name (required) |
string |
Responses
200Renamed — Device401Missing, invalid or expired token — Problem404Not found (also returned for rows the caller may not see, and for disabled features) — Problem
Disconnect a device (e.g. a lost laptop)
Section titled “Disconnect a device (e.g. a lost laptop)”DELETE /v1/orgs/{org}/devices/{device}Revokes it: its socket closes with 4403 and the app signs out; it can’t reconnect with this id. Laptop calls
that were on their way to it go back to waiting for a laptop. Live: device.updated {device_id, revoked: true}.
API keys: not available (needs a person signed in to the app).
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
device (required) |
path | string (uuid) |
Responses
200Deleted — object401Missing, invalid or expired token — Problem404Not found (also returned for rows the caller may not see, and for disabled features) — Problem
The organisation’s “laptop access” switch
Section titled “The organisation’s “laptop access” switch”GET /v1/orgs/{org}/settings/laptopAPI keys: not available (needs a person signed in to the app).
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
Responses
200Switch — LaptopSettings401Missing, invalid or expired token — Problem
Turn laptop access on or off (admins)
Section titled “Turn laptop access on or off (admins)”PUT /v1/orgs/{org}/settings/laptopOff = no agent in the organisation gets laptop tools; calls already waiting fail with a clear reason.
API keys: not available (needs a person signed in to the app).
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
Request body (JSON)
| Field | Type | Description |
|---|---|---|
enabled (required) |
boolean |
Responses
200Switch — LaptopSettings401Missing, invalid or expired token — Problem403Authenticated but not allowed (e.g. unverified email, not the agent’s controller, card routed to someone else) — Problem
The device’s own WebSocket (desktop app, extension)
Section titled “The device’s own WebSocket (desktop app, extension)”GET /v1/devices/wsUpgrade to a WebSocket. The first message must be hello within 10 s
({type: "hello", access_token, device_id, app_version, os_version, granted_folders, allow_shell};
the token may instead be sent as Authorization: Bearer). The server answers ready, then forwards laptop
calls (request, cancel) routed to this device and accepts ping, auth, folders, asking, running,
result and set_agent_access. Full message schemas: api/asyncapi.yaml (channel deviceSocket).
Close codes: 4401 token missing/invalid/expired (refresh and reconnect), 4403 device disconnected (sign out),
4404 unknown device (register again).
Auth: none (public endpoint).
Responses
101Switching protocols