---
title: "Delete a version"
method: DELETE
path: "/v2/teamspaces/{teamspaceId}/libraries/{owner}/{repo}/versions/{version}"
tags: ["Teamspace Libraries"]
---

# Delete a version

`DELETE /v2/teamspaces/{teamspaceId}/libraries/{owner}/{repo}/versions/{version}`

## Request

- Base URL: `https://context7.com/api`
- URL: `https://context7.com/api/v2/teamspaces/{teamspaceId}/libraries/{owner}/{repo}/versions/{version}`
- Auth: HTTP bearer

Delete a tag or branch version of a library the teamspace has claimed.

## Query parameters

- `isBranch` boolean

## Response `200`

The deletion started

- object
  - `success` boolean, required
  - `message` string, required
  - `status` string

## Other responses

- `401`: Unauthorized - Invalid or missing API key
- `403`: The caller cannot access the teamspace or its role is too low (`forbidden`), or the teamspace has not claimed the library (`not_owner`)
- `404`: No such library in the teamspace, or no such version
- `409`: A tag and a branch have this name (`ambiguous_version`). Set `isBranch`.
- `500`: Internal Server Error

## Changes

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

[Operation history](https://skmtc.dev/context7/apis/context7-public-api/changes/v2/teamspaces/:teamspaceId/libraries/:owner/:repo/versions/:version/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)
