What this machine should serve
POST/v1/machine/sync
Machine token
What this machine should serve. Authenticated by the machine's token.
Request body · application/json
hostnamestring | nullosstring | nullservingbooleanSent by the background service only: it marks the machine online.
versionstring | null
Responses
200MachineState401Problem
Fields of MachineState
iduuidrequirednamestringrequiredonlinebooleanrequiredWhether its background service was running just before this call.
tunnelsTunnel[]requiredWhat it should serve.
addressstringrequiredWhat to give to whoever should reach the tunnel: a URL for HTTP,
host:portotherwise.agentsintegerrequiredAgents currently connected. Zero means the tunnel is offline.
created_atdate-timerequiredhostnamestringrequirediduuidrequiredmachine_iduuid | nullThe machine that serves it. Absent for a tunnel not yet attached to one.
workspacestringrequiredThe workspace it belongs to.
curl -X POST "https://api.infraflow.app/v1/machine/sync" \
-H "Authorization: Bearer $MACHINE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"hostname": "www.example.com",
"os": "string",
"serving": true,
"version": "string"
}'{
"id": "0197b2a4-5c1e-7d3a-9f10-4b6c8e2a1d55",
"name": "my-app",
"online": true,
"tunnels": [
{
"address": "string",
"agents": 0,
"created_at": "2026-01-15T09:30:00Z",
"hostname": "www.example.com",
"id": "0197b2a4-5c1e-7d3a-9f10-4b6c8e2a1d55",
"machine_id": "0197b2a4-5c1e-7d3a-9f10-4b6c8e2a1d55",
"name": "my-app",
"port": 3000,
"protocol": "http",
"target": "3000"
}
],
"workspace": "string"
}