> ## Documentation Index
> Fetch the complete documentation index at: https://context7-codex-consolidate-context7-doc-suggestions.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage Policies

> Control which sources and libraries your teamspace can access

Policies control source access and library search results for your teamspace. Configure them from the [policies tab](https://context7.com/dashboard?tab=policies) of your dashboard, or programmatically through the [Policies API](/api-reference/policies/get-teamspace-policies).

Settings apply to requests made with a teamspace API key. Some filters affect
search results only, as described below.

<Note>Policies are scoped to a teamspace. Only owners and admins can change them; developers have read-only access.</Note>

## Source Type Access

The **Source Type Access** card toggles entire categories of sources on or off.
Disabling a type excludes it from results, subject to the quality-mode
exceptions described below.

| Group             | Source Type         | What it covers                       |
| ----------------- | ------------------- | ------------------------------------ |
| Public Sources    | Public Repositories | Public GitHub repositories           |
| Public Sources    | Websites            | Indexed documentation websites       |
| Public Sources    | LLMs.txt            | `llms.txt` sources                   |
| Connected Sources | Confluence          | Atlassian Confluence workspace pages |
| Connected Sources | Uploaded Files      | Uploaded OpenAPI specs and PDFs      |
| Connected Sources | Notion              | Connected Notion pages               |
| Connected Sources | Private Sources     | Privately parsed repositories        |

## Library Filters

The **Library Filters** card decides which public libraries are accessible. Choose one of two modes:

### Filter by Quality

Allow any public library that clears the quality bar you set. Available filters:

| Filter            | Options                          |
| ----------------- | -------------------------------- |
| Verification      | All · Verified Only              |
| Trust score       | All · Medium (4+) · High (7+)    |
| Freshness         | All · 30 days · 90 days · 1 year |
| Repo stars        | All · 100+ · 1,000+ · 10,000+    |
| Website backlinks | All · 500+ · 2,500+ · 5,000+     |
| Referring domains | All · 100+ · 500+ · 1,000+       |
| Organic traffic   | All · 100+ · 1,000+ · 10,000+    |

Search combines enabled filters with AND semantics. A result must pass each
applicable check unless an exception applies. Leaving a filter on **All**
disables that check.

Star and license filters apply only to public GitHub repositories. Websites
and other non-repo sources pass through those checks. Backlink,
referring-domain, and organic-traffic thresholds apply only to websites.

You can filter public repository search results by an allowlist of SPDX
license identifiers, such as `MIT` or `Apache-2.0`.

<Note>
  License filtering only affects search results. Direct `/api/v2/context`
  requests and `query-docs` calls with a known library ID do not enforce the
  license allowlist.
</Note>

You can also maintain two override lists in quality mode:

* **Blocked libraries** exclude matching libraries even if they pass the quality checks.
* **Excepted libraries** bypass quality checks and can override source type restrictions. Search still excludes private sources when **Private Sources** is disabled.

In search, an exception overrides a blocked entry only when both entries are
identical. For example, excepting `/org/repo` does not override a blocked
`/org`, and excepting `/org` does not override a blocked `/org/repo`. Remove
the overlapping blocked entry to make the exception work in search.

Direct context requests give a matching exception priority over blocked
entries. Search and direct context access can therefore differ for
overlapping organization and library entries.

### Select Manually

Ignore the quality bar entirely and grant access only to a hand-picked list of libraries. Anything not on the list is inaccessible.

<Note>The card shows the number of libraries currently accessible under your settings, so you can see the impact before saving.</Note>

## Managing Policies via API

The same configuration is available over the REST API using a teamspace API key:

* [Get Policies](/api-reference/policies/get-teamspace-policies) — `GET /api/v2/policies` returns the current configuration and accessible library count.
* [Update Policies](/api-reference/policies/update-teamspace-policies) — `PATCH /api/v2/policies` applies an incremental update; only the fields you include are changed.

See the [API Guide](/api-guide) for request and response details.
