---
title: "Every preview of a sandbox, lowest port first, each private one with a fresh token that lasts a day; tokens signed before keep their own expiry."
method: GET
path: "/v1/sandboxes/{id}/previews"
tags: ["previews"]
---

# Every preview of a sandbox, lowest port first, each private one with a fresh token that lasts a day; tokens signed before keep their own expiry.

`GET /v1/sandboxes/{id}/previews`

## Request

- Base URL: `https://api.withruntime.com`
- URL: `https://api.withruntime.com/v1/sandboxes/{id}/previews`
- Auth: HTTP bearer

## Path parameters

- `id` string, required: Resource identifier (UUID).

## Response `200`

Success

- object
  - `data` object[], required
    - `id` string
    - `sandboxId` string
    - `port` integer
    - `visibility` string
    - `url` string: The address. A private preview also needs the token.
    - `token` string, nullable: Private previews: a token signed for this answer. Every create and read signs its own, each with its own tokenExpiresAt (a day unless ttlSeconds or expiresAt asks otherwise); tokens signed before keep working until their own expiry or a rotate. Null for a key that cannot run commands in the sandbox, such as a read-only key.
    - `tokenExpiresAt` string, date-time, nullable: When this answer's token stops working. It is not stored on the preview: another read signs another token with its own expiry, and does not shorten or extend this one.
    - `urlWithToken` string, nullable: Private previews: a link that carries the token once, for a browser.
    - `disabled` boolean: Turned off by Runtime after a report. Contact support.
    - `embedOrigins` string[], nullable: The sites that may show it in an iframe; null for any site.
    - `createdAt` string, date-time
  - `nextCursor` string, nullable, required: Pass as cursor; null ends the list.

## Other responses

- `default`: Error

---

[API](https://skmtc.dev/withruntime/apis/runtime-cloud-api.md) · [All operations](https://skmtc.dev/withruntime/apis/runtime-cloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/withruntime/apis/runtime-cloud-api/revisions/6f4012286988?raw)
