Browse documentation

Devices

Inspect devices available to the key and request safe, predefined actions.

Remote control starts disabled. Enable it locally with pwrp remote enable, or in the desktop app under Settings > Remote Control. The API may query or disable it, but cannot enable it.

List devices

GET/devicesdevices:read

Returns devices visible to the key with their online state, client version, capabilities and remote-control consent.

Response
{
  "data": [{
    "id": "DEVICE_ID",
    "owner_id": "USER_ID",
    "name": "Home server",
    "platform": "linux",
    "version": "2.4.0",
    "online": true,
    "remote_control_enabled": true,
    "capabilities": ["remote_control_v1", "runtime_lease_v1", "command_dedup_v1", "restart_agent_v1"],
    "last_seen_at": "2026-09-09T18:00:00+00:00"
  }],
  "meta": {"request_id":"...","next_cursor":null}
}

Get a device

GET/devices/{device_id}devices:read

Returns the same device shape as the list endpoint. A resource outside the key's personal or Team scope returns 404.

Rename or disable remote control

PATCH/devices/{device_id}devices:write

Only the device owner may update it. Supply one or both supported fields.

FieldUse
nameNew display name.
remote_control_enabledOnly false is accepted.
JSON body
{"name":"Office PC","remote_control_enabled":false}

Stop all tunnels or restart the agent

POST/devices/{device_id}/actions/stop-alldevices:control

Stops every tunnel running on the device and returns a 202 operation. The device must be online and remotely enabled. Idempotency required.

Shell
curl -X POST https://api.portwarp.com/v2/devices/DEVICE_ID/actions/stop-all \
  -H "Authorization: Bearer $PORTWARP_API_KEY" \
  -H "Idempotency-Key: stop-all-office-001"
POST/devices/{device_id}/actions/restart-agentdevices:control

Restarts the Portwarp agent and returns a 202 operation. The device must be online, remotely enabled and advertise restart_agent_v1. Idempotency required.

Team access

Team owners and admins may control devices of active members. Members may see Team devices but can only control devices they own.