---
title: "Update Knowledge Source"
method: PATCH
path: "/v1/agent/knowledge-sources/{source_id}"
tags: ["Knowledge Sources"]
---

# Update Knowledge Source

`PATCH /v1/agent/knowledge-sources/{source_id}`

## Request

- Base URL: `https://api.fish.audio`
- URL: `https://api.fish.audio/v1/agent/knowledge-sources/{source_id}`
- Auth: HTTP bearer

Rename the source and/or replace its content by uploading a new file in
`source` (multipart). Replacing content increments `revision_number` while
the id stays stable, and every attached agent's draft picks it up
immediately; published versions pin the revision they were published with,
so republish each affected agent to put the new content live — that
two-step (sync content, republish) is the nightly content-sync recipe.

## Path parameters

- `source_id` string, required

## Request body `multipart/form-data`

- object
  - `source` string, binary, nullable
  - `name` string, nullable
  - `description` string, nullable

## Response `200`

Request fulfilled, document follows

- object
  - `knowledge_source_id` string, required
  - `workspace_id` string, required
  - `name` string, required
  - `description` string
  - `file_name` string, required
  - `size_bytes` integer, required
  - `chunk_count` integer, required
  - `revision_number` integer, required: Increments every time the content is replaced. Drafts always use the newest revision; published versions pin the revision current at publish time.
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `content` string, required: The full current text content.

## Other responses

- `400`: Bad request syntax or unsupported method
- `401`: No permission -- see authorization schemes
- `404`: Nothing matches the given URI
- `422`
- `503`: The server cannot process the request due to a high load

## Changes

- **2026-11-03** `42ac421f7a12`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/fish/apis/fishaudio-openapi/changes/v1/agent/knowledge-sources/:source_id/patch.md)

---

[API](https://skmtc.dev/fish/apis/fishaudio-openapi.md) - [All operations](https://skmtc.dev/fish/apis/fishaudio-openapi/llms.txt) - [OpenAPI document](https://skmtc.dev/fish/apis/fishaudio-openapi/revisions/42ac421f7a12?raw)
