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

# Get a deployment

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

## Request

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

One build. Any member. Only for GitHub sites: a CLI site (`source: "local"`) answers 404.

## Path parameters

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

## Response `200`

The build

- object
  - `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

## 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/:deploymentId/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)
