---
title: "Update library settings"
method: PATCH
path: "/v2/teamspaces/{teamspaceId}/libraries/{owner}/{repo}"
tags: ["Teamspace Libraries"]
---

# Update library settings

`PATCH /v2/teamspaces/{teamspaceId}/libraries/{owner}/{repo}`

## Request

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

Change the owner settings of a library the teamspace has claimed. The next refresh uses them.

## Request body

- TeamspaceLibraryConfigUpdate: Owner settings. Send only the fields to change. A changed title or description of a public library is reviewed before it is saved. Rules are checked for unsafe content.
  - `projectTitle` string
  - `description` string
  - `baseUrl` string: Website base URL (http or https).
  - `webUrl` string: Link shown on the library page (http or https).
  - `branch` string: Branch to parse (repositories).
  - `folders` string[]: Only parse these folders.
  - `excludeFolders` string[]
  - `excludeFiles` string[]
  - `includeExtensions` string[]: Extra file extensions parsed as documentation (repositories), such as ".fizz". Source code extensions are ignored.
  - `rules` string[]: Rules shown to agents with the documentation.
  - `disallow` boolean: Stop indexing the library.
  - `useQueryParams` boolean: Keep query parameters when crawling (websites).
  - `excludeUrls` string[]: URLs not to crawl (websites).
  - `skipClaudeVersionExclusion` boolean: Keep pages that look version-specific.
  - `generateDocs` boolean: Generate docs from the source code on each refresh with new commits (private repositories). Each run is billed as parsing.
  - `configSource` 'dashboard' | 'context7json': Where the parser reads settings from: these settings, or the repository's `context7.json` (claimed repositories).

## Response `200`

The saved settings

- object
  - `config` TeamspaceLibraryConfig, required: The saved owner settings. Unset fields are null.
    - `projectTitle` string, nullable
    - `description` string, nullable
    - `baseUrl` string, nullable
    - `webUrl` string, nullable
    - `branch` string, nullable
    - `folders` string[], nullable
    - `excludeFolders` string[], nullable
    - `excludeFiles` string[], nullable
    - `includeExtensions` string[], nullable
    - `rules` string[], nullable
    - `disallow` boolean, nullable
    - `useQueryParams` boolean, nullable
    - `excludeUrls` string[], nullable
    - `skipClaudeVersionExclusion` boolean, nullable
    - `generateDocs` boolean, nullable: Null for public repositories.
    - `configSource` 'dashboard' | 'context7json', nullable

## Other responses

- `400`: Invalid settings, unsafe rules (`unsafe_rules`, with `flaggedRules`), or a title or description the review refused (`metadata_rejected`)
- `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`: The teamspace has no library with this id (neither claimed nor one of its private sources)
- `500`: Internal Server Error
- `503`: The rules review (`rules_review_unavailable`) or the title and description review (`metadata_review_unavailable`) is not available; try again

## Changes

- **2026-10-28** `f5831eae055c`: 2 info
  - added the new optional request property `includeExtensions`
  - added the optional property `config/includeExtensions` to the response with the `200` status
- **2026-10-27** `d0544e4323da`: 2 info
  - added the new optional request property `generateDocs`
  - added the optional property `config/generateDocs` to the response with the `200` status
- **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/patch.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)
