---
title: "Delete a Docs7 site"
method: DELETE
path: "/v2/teamspaces/{teamspaceId}/sites/{siteId}"
tags: ["Docs7 Sites"]
---

# Delete a Docs7 site

`DELETE /v2/teamspaces/{teamspaceId}/sites/{siteId}`

## Request

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

Delete a GitHub or CLI site with its deployments, previews, custom domain and analytics. Calling it again after a partial cleanup retries the cleanup. Owner or admin.

## Path parameters

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

## Response `200`

Deleted

- object
  - `data` object, required
    - `deleted` true

## 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
- `409`: A delete is already running or the site changed (`site_delete_in_progress`, `site_changed`, `site_delete_lease_lost`, `project_busy`)
- `500`: Internal error
- `502`: Cleanup failed; retry the delete

## 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/delete.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)
