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

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

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

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

## 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.

---

[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/d1cc15eb5ef9/schema)
