# List exposed ports

> The ports this sandbox exposes and their URLs. Empty when none were exposed.

`GET https://api.zavu.dev/v1/sandboxes/{sandboxId}/ports`

The ports this sandbox exposes and their URLs. Empty when none were exposed.

## Parameters

- `sandboxId` (path, string, required): Sandbox ID.

## Responses

### 200

Ports.

- `items` (object[], required)
  - `port` (integer, required)
  - `url` (string<uri>, required): HTTPS URL on `zavu.run` that reaches the port, WebSockets included. Calling this again for the same port returns the same URL. It keeps working across a stop and resume; while the sandbox is stopped it answers `503`, and once the sandbox is deleted it answers `404`.
  - `public` (boolean, required)

### 401

Unauthorized.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

### 404

Sandbox not found, or it belongs to another project.

- `code` (string, required)
- `message` (string, required)
- `details` (object)

## Example

```bash
curl -X GET "https://api.zavu.dev/v1/sandboxes/sandbox_abc123/ports" \
  -H "Authorization: Bearer $ZAVUDEV_API_KEY"
```

```typescript
import Zavudev from "@zavudev/sdk";

const zavu = new Zavudev({ apiKey: process.env.ZAVUDEV_API_KEY });

const result = await zavu.sandboxes.ports.list("sandbox_abc123");

console.log(result);
```
