> ## Documentation Index
> Fetch the complete documentation index at: https://usenaive.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Public Link (Tunnel) — Device

> Device-token authenticated. Read and toggle the box's {slug}.tower.usenaive.ai public link.

The public link is served by the Naïve **edge relay** over the box's single
**outbound-initiated** tunnel — so a `{slug}.tower.usenaive.ai` URL reaches the
box panel/API from anywhere while **zero inbound ports** are opened on the box.
These endpoints are device-token authenticated.

### Status

```bash theme={"theme":"css-variables"}
curl https://api.usenaive.ai/v1/devices/self/tunnel \
  -H "Authorization: Bearer <device_token>"
```

```json 200 theme={"theme":"css-variables"}
{ "enabled": true, "slug": "acme", "url": "https://acme.tower.usenaive.ai" }
```

### Enable

`POST /v1/devices/self/tunnel/enable` allocates (or re-enables) the link and
returns the public URL.

```bash theme={"theme":"css-variables"}
curl -X POST https://api.usenaive.ai/v1/devices/self/tunnel/enable \
  -H "Authorization: Bearer <device_token>"
```

```json 200 theme={"theme":"css-variables"}
{ "enabled": true, "url": "https://acme.tower.usenaive.ai" }
```

### Disable

`POST /v1/devices/self/tunnel/disable` turns the link off — the edge relay stops
routing to the box.

```bash theme={"theme":"css-variables"}
curl -X POST https://api.usenaive.ai/v1/devices/self/tunnel/disable \
  -H "Authorization: Bearer <device_token>"
```

<Note>
  Self-hosted only. The owner-facing view of the same link is
  [`GET /v1/devices/tunnel`](/docs/api-reference/devices/public-link). See
  [the public link](/docs/self-hosting/public-link).
</Note>
