Skip to main content
PATCH
Update library policies

Authorizations

Authorization
string
header
required

Get your API key at context7.com/dashboard. Treat your API key like a password and store it securely. Every key can read the management API (/v2/teamspaces/*), except personal data: member and invitation emails, library requesters, visitor questions, Docs7 reader searches, conversations, feedback and feature requests, and the GitHub account behind a build. To read those or make changes there, the key must be created with Write access ticked; other keys get 403 write_access_required.

Path Parameters

teamspaceId
string<uuid>
required

Teamspace id (from GET /v2/teamspaces).

Body

application/json

Incremental policy update. All fields are optional — only provided fields are modified. At least one of 'sourceTypes' or 'libraryFilters' must be provided.

dryRun
boolean

Preview the change and its library count without saving.

sourceTypes
object

Enable or disable specific source types. Both can be provided in one request, but the same type cannot appear in both arrays.

libraryFilters
object

Update library access filters.

Response

Updated policies, or the dry-run preview

Complete teamspace policy configuration

sourceTypes
object
required

Access settings for each documentation source type

libraryFilters
object
required

Library access filters. Mode determines which sub-object is active.

accessibleLibraryCount
integer
required

Number of public libraries currently accessible under these filters