> ## 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 context about your organization. The context includes documents, policies, and per-repository profiles. Strix uses this context when it does scans and reviews.

## 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`

## Search documents

Use the `search` parameter to filter the document list:

```bash theme={null}
curl -X GET "https://app.strix.ai/api/v1/knowledge?search=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 `policy_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 '{
    "policy_key": "out-of-scope",
    "policy_value": "Never test the billing provider endpoints.",
    "policy_type": "constraint",
    "is_active": true,
    "metadata": {"owner": "security"}
  }'
```

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`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.