---
title: "List the workspace’s exposed ports"
method: GET
path: "/v1/workspaces/{workspace_id}/ports"
tags: ["Workspaces"]
---

# List the workspace’s exposed ports

`GET /v1/workspaces/{workspace_id}/ports`

## Request

- Base URL: `https://api.shardflux.dev`
- URL: `https://api.shardflux.dev/v1/workspaces/{workspace_id}/ports`
- Auth: HTTP bearer

Ordered by port. `callback` is set when the port has a callback URL (its secret is never shown again). Errors: 403 forbidden details.reason inbound_ports_not_available (inbound ports are not enabled for the organization), 409 conflict not_supported_for_mode (file-first workspace) or workspace_deleted, 422 validation_failed for a port outside 1-65535 (details.reason port_reserved for 61001, the workspace desktop’s control port).

## Path parameters

- `workspace_id` string, uuid, required

## Response `200`

Default Response

- object
  - `ports` Port[], required
    - `port` integer, required: TCP port inside the workspace (1-65535).
    - `url` string, required: https://<port>-<handle>.<ingress domain>: requests need a port token (Authorization: Bearer sfp_…), a signed link’s cookie, or the callback URL.
    - `created_at` string, date-time, required: RFC 3339 UTC timestamp with Z.
    - `callback` object, nullable, required: The port’s callback URL exists (its secret is shown only when it is created).
      - `created_at` string, date-time, required: RFC 3339 UTC timestamp with Z.

## Other responses

- `4XX`: Default Response
- `5XX`: Default Response

---

[API](https://skmtc.dev/shardflux/apis/shardflux-api.md) · [All operations](https://skmtc.dev/shardflux/apis/shardflux-api/llms.txt) · [OpenAPI document](https://skmtc.dev/shardflux/apis/shardflux-api/revisions/ea685f7b39c4?raw)
