---
title: "Update Knowledge Source"
method: PUT
path: "/api/v1/knowledge/{knowledge_source_id}"
tags: ["knowledge"]
---

# Update Knowledge Source

`PUT /api/v1/knowledge/{knowledge_source_id}`

## Request

- Base URL: `https://api.gnosari.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.gnosari.com/api/v1/knowledge/{knowledge_source_id}`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-AUTH-TOKEN`

Update a knowledge source.

## Path parameters

- `knowledge_source_id` integer, required

## Request body

- KnowledgeSourceUpdate: Schema for updating a knowledge source. All fields optional.
  - `name` string, nullable
  - `data_type` string, nullable
  - `paths` string[], nullable
  - `status` string, nullable
  - `description` string, nullable
  - `identifier` string, nullable
  - `config` object, nullable

## Response `200`

Successful Response

- KnowledgeSource: Response schema for knowledge source.
  - `name` string, required
  - `data_type` string, required
  - `paths` string[]
  - `status` string
  - `loading_status` 'unloaded' | 'loading' | 'loaded' | 'partial' | 'failed': Pydantic-compatible enum for serialization.
  - `description` string, nullable
  - `identifier` string, nullable
  - `config` object, nullable
  - `loaded_at` string, date-time, nullable
  - `loading_started_at` string, date-time, nullable
  - `loading_error` string, nullable
  - `loading_urls_total` integer, nullable
  - `loading_urls_done` integer, nullable
  - `document_count` integer
  - `id` integer, required
  - `account_id` integer, nullable
  - `agents` AgentMinimal[]
    - `id` integer, required
    - `name` string, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/gnosari/apis/gnosari-api.md) · [All operations](https://skmtc.dev/gnosari/apis/gnosari-api/llms.txt) · [OpenAPI document](https://skmtc.dev/gnosari/apis/gnosari-api/revisions/f299cf53ae5f?raw)
