POST /tunnels/session
Mints a short-lived agent token and a connectUrl for the edge WebSocket (/agent). The CLI does this before it binds HTTP or TCP.
curl -X POST https://api.portlify.ru/tunnels/session \
-H "Authorization: Bearer plfy_…" \
-H "Content-Type: application/json" \
-d '{}'Binding a hostname happens on that WebSocket, not with another REST call. Use the CLI unless you are writing another agent.
GET /tunnels
curl https://api.portlify.ru/tunnels \ -H "Authorization: Bearer plfy_…"
Each row has protocol, hostname or tcpPort, status, upstream host/port. Status is online when an agent is connected.
GET /tunnels/:id
One tunnel you own.
GET /tunnels/:id/logs
curl https://api.portlify.ru/tunnels/<id>/logs \ -H "Authorization: Bearer plfy_…"
Live updates also arrive on Socket.IO as tunnel:log when you are on the dashboard.