Docs

List previews

GET
/projects/{project_id}/previews

Lists the project's live previews, newest first by created_at. An expired or removed preview is not listed; what was deployed to it stays in GET /deployments.

Authorization

oauth2 deployment.read
headerAuthorizationBearer <token>

Scope: deployment.read

Path Parameters

project_id*string

The unique identifier of the project.

Match^[a-zA-Z0-9_-]+$

Query Parameters

limit?integer

Maximum number of items to return.

Range1 <= value <= 100
Default20
page_token?string

Token for fetching the next page of results. Obtain this value from next_page_token in the previous response. Omit to start from the beginning. Its format is opaque and may change between releases.

Response Body

The previews were listed successfully.

application/json
  1. response

The project's live previews, newest first.

previews*array<>
next_page_token?|

Token to pass as page_token in the next request to fetch the following page. Absent when there are no more results.

Example Request
import { createZitadelClient } from "@zitadel/api/client";const client = createZitadelClient({  baseUrl: process.env.ZITADEL_URL ?? "http://localhost:8080",  token: process.env.ZITADEL_PROJECT_SECRET!, // server-side only});const previews = await client.listPreviews("proj_01KWH1P4MYS7F0N9WD3P2E4YM5");
Example Response

One preview deploy wrote both, so they share an expiry.

{  "previews": [    {      "origin": "https://acme-git-sso-acmeinc.vercel.app",      "expires_at": "2026-10-09T14:10:00Z",      "created_at": "2026-10-02T14:10:00Z"    },    {      "origin": "https://acme-k3x9v2-acmeinc.vercel.app",      "expires_at": "2026-10-09T14:10:00Z",      "created_at": "2026-10-02T14:10:00Z"    }  ],  "next_page_token": null}

Was this helpful?