---
title: "Get claim instructions"
method: GET
path: "/v2/teamspaces/{teamspaceId}/libraries/{owner}/{repo}/claim"
tags: ["Teamspace Libraries"]
---

# Get claim instructions

`GET /v2/teamspaces/{teamspaceId}/libraries/{owner}/{repo}/claim`

## Request

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

The `context7.json` to publish to claim a library for this teamspace, with the teamspace's public key. The library need not belong to the teamspace yet. Publish the file, then call the verify operation.

## Response `200`

Claim instructions

- TeamspaceLibraryClaim
  - `libraryName` string, required
  - `claimed` boolean, required: Some teamspace has claimed the library.
  - `ownedByTeamspace` boolean, required: This teamspace has claimed it.
  - `method` 'repository' | 'hostedFile', required: `repository`: commit the file to the root of the repository's default branch. `hostedFile`: host it anywhere under `hostUnder` (websites, llms.txt, OpenAPI).
  - `repositoryUrl` string: The repository to commit to (`repository`).
  - `hostUnder` string: The file's URL must start with this URL (`hostedFile`).
  - `publicKey` string, required: The teamspace's public key.
  - `fileName` 'context7.json', required
  - `fileContent` string, required: The file to publish, as text.

## Other responses

- `400`: This kind of library cannot be claimed (uploads, Confluence, Notion)
- `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 library does not exist or the caller cannot see it
- `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/claim/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)
