---
title: "Create a tunnel to an available port on the Devbox."
method: POST
path: "/v1/devboxes/{id}/create_tunnel"
tags: ["Devbox", "Devbox-NetworkTools"]
deprecated: true
---

# Create a tunnel to an available port on the Devbox.

`POST /v1/devboxes/{id}/create_tunnel`

> **Deprecated.**

[Deprecated] Use POST /v1/devboxes/{id}/enable_tunnel instead. This endpoint creates a legacy tunnel. The new enable_tunnel endpoint provides improved tunnel functionality with authentication options.

## Path parameters

- `id` string, required

## Request body

- DevboxTunnelParameters
  - `port` integer, required — Devbox port that tunnel will expose.

## Response `200`

OK

- DevboxTunnelView
  - `devbox_id` string, required — ID of the Devbox the tunnel routes to.
  - `port` integer, required — Port of the Devbox the tunnel routes to.
  - `url` string, required — Public url used to access Devbox.

## Other responses

- `400` — Devbox is not currently running.
- `404` — Devbox not found.

## Changes

- **2026-01-30** `debd1f9a9d59` — 1 info
  - endpoint deprecated

[Change history](https://skmtc.dev/runloopai/apis/runloop-api/changes/v1/devboxes/:id/create_tunnel/post.md)

---

[API](https://skmtc.dev/runloopai/apis/runloop-api.md) · [All operations](https://skmtc.dev/runloopai/apis/runloop-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/runloopai/runloop-api/revisions/c8d61a0c8b88/schema)
