# Mint tunnel access

Collection: api
Human docs: https://zei.sh/docs/api

Mint a short-lived WebSocket tunnel for exposed TCP ports.

POST /public/sandboxes/:sandboxId/tunnel-access
Permission: MACHINE_UPDATE.
Use this for CDP, databases, and other protocols that do not work through an HTTP Host header.
Request body: {"ttl_seconds":60}
Response: ws_url, token, and expires_at.
TTL is 1 through 3600 seconds. The default is 60 seconds.

Example:

```
curl -X POST https://api.zei.sh/api/v1/public/sandboxes/:sandboxId/tunnel-access \
  -H "X-API-Key: $ZEISH_API_KEY"
  -H "Content-Type: application/json" \
  -d '{"ttl_seconds":60}'
```
