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

# Add a version

`POST /v2/teamspaces/{teamspaceId}/libraries/{owner}/{repo}/versions`

## Request

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

Parse a tag or branch of the repository as a version of its own. The call returns once the parse has started; poll the library details.

## Request body

- object
  - `version` string, required: Tag or branch name.
  - `isBranch` boolean: `version` is a branch.

## Response `200`

The parse started

- object
  - `projectName` string, required
  - `tagCode` string, required
  - `message` string, required

## Other responses

- `400`: Bad Request - Invalid input parameters
- `401`: Unauthorized - Invalid or missing API key
- `403`: The caller cannot access this teamspace, the API key belongs to another teamspace, or the caller's role is too low
- `404`: The teamspace has no library with this id (neither claimed nor one of its private sources)
- `409`: No token for the private repository
- `500`: Internal Server Error
- `504`: Gateway Timeout - Processing timed out waiting for logs

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