Tunnels

POST /v5/tunnels

Changed on

Create a WireGuard tunnel (default) or a managed Tailscale subnet router, optionally attaching VPCs. WireGuard returns a fixed configuration and a one-time client private key. Tailscale enrollment is asynchronous: poll GET for status and authUrl, or provide a write-only auth key. Administrators must approve the advertised VPC routes unless tailnet autoApprovers cover them. DNS and per-VM Tailscale identities are not configured.

Request

  • Base URL
    https://api.freestyle.sh (the document declares no server; this is the origin it was published from)
  • Auth
    HTTP bearer

Request body

clientPublicKeystring nullable

The public key of a keypair you already hold. Omit to have one minted for you; supply it and the platform never sees a private key at all.

displayNamestring nullable

A free-form label, for telling several tunnels apart.

routesstring[] nullable

The ranges your client will route through the tunnel — its AllowedIPs, fixed for the tunnel's life so attaching and detaching networks never changes your config. Omit for the default (10.0.0.0/8 and fd00::/8), which covers every network with default addressing. Only networks whose CIDRs fall inside the routes can be attached.

slugstring nullable

A URL-safe handle, unique within your account: 1–63 chars of [a-z0-9-], no leading, trailing, or repeated hyphens. Address the tunnel by it instead of by id.

type'wireguard' | 'ikev2' | 'tailscale'

Response

Tunnel created; Tailscale enrollment may still be pending

OR
OR

Changes

    • breaking

      added to the response body oneOf list for the response status

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      removed subschema #2 from the response body allOf list for the response status