Teamspace Libraries

Get claim instructions

Changed on

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.

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

Response

Claim instructions

libraryNamestring required
claimedboolean required

Some teamspace has claimed the library.

ownedByTeamspaceboolean 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).

repositoryUrlstring

The repository to commit to (repository).

hostUnderstring

The file's URL must start with this URL (hostedFile).

publicKeystring required

The teamspace's public key.

fileName'context7.json' required
fileContentstring required

The file to publish, as text.

Example response

{
  "libraryName": "/acme/docs",
  "fileContent": "{\n  \"url\": \"https://context7.com/acme/docs\",\n  \"public_key\": \"pk_...\"\n}"
}

Changes