references/tunnel/api.md
Tunnel APIs and Commands
Fetch current operation schemas, permissions, and examples before automating tunnel changes.
| Task | Documentation | | --- | --- | | Create a tunnel, configure ingress, and create application DNS through the API | Setup | | List existing tunnels and inspect response fields | List Cloudflare Tunnels API | | Retrieve and rotate tunnel tokens | Tunnel tokens | | Manage local tunnels using the CLI | Useful commands | | Configure public DNS and routing behavior | Routing | | Select private-network integration and its setup guide | Integrations |
Identify the account, tunnel ID, and management mode before a write. Review existing routes before replacing configuration; distinguish tunnel lifecycle operations from DNS changes. Use patterns.md when infrastructure as code owns these resources.