> ## Documentation Index
> Fetch the complete documentation index at: https://docs.app.strix.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Knowledge

> Manage organization knowledge, policies, and repository profiles

export const ScarfPixel = () => <img referrerPolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=831669b6-b4bd-42cb-8832-2122c03e1d5f" alt="" width="1" height="1" style={{
  position: "absolute",
  width: 0,
  height: 0,
  opacity: 0,
  pointerEvents: "none"
}} />;

<ScarfPixel />

The knowledge base gives Strix org-specific context — documents, policies, and per-repository profiles — that informs how scans and reviews are performed.

## Documents

List documents:

```bash theme={null}
curl -X GET "https://app.strix.ai/api/v1/knowledge" \
  -H "Authorization: Bearer <YOUR_API_TOKEN>"
```

**Required scope:** `knowledge:read`

Create a document:

```bash theme={null}
curl -X POST "https://app.strix.ai/api/v1/knowledge" \
  -H "Authorization: Bearer <YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Auth architecture",
    "content": "We use WorkOS for SSO and short-lived JWTs...",
    "tags": ["auth", "architecture"]
  }'
```

**Required scope:** `knowledge:write`

Update or delete a document:

```bash theme={null}
curl -X PATCH "https://app.strix.ai/api/v1/knowledge/<DOCUMENT_ID>" \
  -H "Authorization: Bearer <YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"content": "Updated content"}'

curl -X DELETE "https://app.strix.ai/api/v1/knowledge/<DOCUMENT_ID>" \
  -H "Authorization: Bearer <YOUR_API_TOKEN>"
```

**Required scope:** `knowledge:write`

## Query the knowledge base

Search across knowledge for relevant context:

```bash theme={null}
curl -X GET "https://app.strix.ai/api/v1/knowledge/query?q=authentication" \
  -H "Authorization: Bearer <YOUR_API_TOKEN>"
```

**Required scope:** `knowledge:read`

## Policies

List policies:

```bash theme={null}
curl -X GET "https://app.strix.ai/api/v1/knowledge/policies" \
  -H "Authorization: Bearer <YOUR_API_TOKEN>"
```

**Required scope:** `knowledge:read`

Create or update a policy (upsert by `key`):

```bash theme={null}
curl -X POST "https://app.strix.ai/api/v1/knowledge/policies" \
  -H "Authorization: Bearer <YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "key": "out-of-scope",
    "content": "Never test the billing provider endpoints.",
    "enabled": true
  }'
```

Delete a policy:

```bash theme={null}
curl -X DELETE "https://app.strix.ai/api/v1/knowledge/policies/<POLICY_KEY>" \
  -H "Authorization: Bearer <YOUR_API_TOKEN>"
```

**Required scope:** `knowledge:write`

## Repository profiles

List repository knowledge profiles and their entries:

```bash theme={null}
curl -X GET "https://app.strix.ai/api/v1/knowledge/repos" \
  -H "Authorization: Bearer <YOUR_API_TOKEN>"

curl -X GET "https://app.strix.ai/api/v1/knowledge/repos/<REPO>/entries" \
  -H "Authorization: Bearer <YOUR_API_TOKEN>"
```

**Required scope:** `knowledge:read`

Update a repository profile:

```bash theme={null}
curl -X PATCH "https://app.strix.ai/api/v1/knowledge/repos/<REPO>/profile" \
  -H "Authorization: Bearer <YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"content": "This service handles PCI data."}'
```

**Required scope:** `knowledge:write`

## Settings

```bash theme={null}
curl -X GET "https://app.strix.ai/api/v1/knowledge/settings" \
  -H "Authorization: Bearer <YOUR_API_TOKEN>"

curl -X PATCH "https://app.strix.ai/api/v1/knowledge/settings" \
  -H "Authorization: Bearer <YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"org_knowledge_enabled": true}'
```

**Required scopes:** `knowledge:read` (GET), `knowledge:write` (PATCH)
