API

Deprovision Tunnel

Close an active tunnel connection and clean up. Requires the connect token (the token query parameter from the provision response's connectUrl), so only the tunnel's owner can deprovision it.

DELETE/api/agent/tunnels/:subdomain?token=<token>
json
{
  "subdomain": "tunnel-a1b2c3d4",
  "status": "deprovisioned"
}

Without a valid token the request returns 403. Note that deprovisioning is rarely needed: disconnecting the client pauses billing, and the TTL auto-stops the tunnel.