---
title: "List deployments"
method: GET
path: "/v2/teamspaces/{teamspaceId}/sites/{siteId}/deployments"
tags: ["Docs7 Sites"]
---

# List deployments

`GET /v2/teamspaces/{teamspaceId}/sites/{siteId}/deployments`

## Request

- Base URL: `https://context7.com/api`
- URL: `https://context7.com/api/v2/teamspaces/{teamspaceId}/sites/{siteId}/deployments`
- Auth: HTTP bearer

One page (20 builds, newest first) of the site's build history, with its live targets. Any member. Only for GitHub sites: a CLI site (`source: "local"`) answers 404.

## Path parameters

- `teamspaceId` string, uuid, required
- `siteId` string, uuid, required

## Query parameters

- `page` integer

## Response `200`

A page of deployments

- Docs7DeploymentPage
  - `data` Docs7Deployment[], required
    - `id` string, uuid, required
    - `siteId` string, uuid, required
    - `hostname` string, required
    - `workerName` string
    - `target` 'production' | 'preview', required
    - `branch` string, nullable: Preview branch; null for production.
    - `trigger` 'connect' | 'manual' | 'push' | 'pull_request', required
    - `state` 'queued' | 'building' | 'succeeded' | 'failed' | 'canceled', required
    - `sourceKind` 'git' | 'cli'
    - `attributionRequired` boolean
    - `requestedCommitSha` string, nullable
    - `commitSha` string, nullable
    - `commitMessage` string, nullable
    - `triggeredBy` string, nullable: User id when a member started the build.
    - `createdAt` string, date-time, required
    - `startedAt` string, date-time, nullable
    - `completedAt` string, date-time, nullable
    - `failure` object: Only on a failed build.
      - `kind` 'content' | 'configuration' | 'source' | 'capacity' | 'platform', required
      - `message` string, required
    - `cancellation` object: Only on a canceled build.
      - `reason` 'superseded' | 'preview_removed' | 'site_removed' | 'target_changed', required
      - `replacementDeploymentId` string, uuid
  - `targets` Docs7DeploymentTarget[], required
    - `hostname` string, required
    - `workerName` string
    - `branch` string, nullable, required: Null for production.
    - `liveDeploymentId` string, uuid, nullable, required
    - `publicUrl` string, uri, nullable, required
    - `customDomainRouting` 'dns' | 'proxy', nullable
  - `setupNotice` object, nullable, required: A setup step the live build needs. Only on page 0.
    - `id` string
    - `kind` 'intercom_trusted_domain'
    - `hostnames` string[]
    - `intercomAppId` string
  - `page` integer, required
  - `totalCount` integer, required
  - `totalPages` integer, required

## Other responses

- `400`: Invalid teamspace or site id
- `401`: Missing or invalid bearer
- `403`: Not a member, missing role, or an API key of another teamspace
- `404`: No such site in this teamspace
- `500`: Internal error

## Changes

- **2026-10-22** `e17589fd8767`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/context7/apis/context7-public-api/changes/v2/teamspaces/:teamspaceId/sites/:siteId/deployments/get.md)

---

[API](https://skmtc.dev/context7/apis/context7-public-api.md) - [All operations](https://skmtc.dev/context7/apis/context7-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/context7/apis/context7-public-api/revisions/945f7834fa8c?raw)
