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

# Update, pause or resume a knowledge source

> Rename a source, replace its configuration, or pause and resume it. An update reads nothing: the source's documents stay as they are until the next sync.

Changes a source's name, configuration or status. Every field is optional and a field you leave out is unchanged, but the request must change something: an empty body returns `400`.

An update ingests nothing and removes nothing. What the source already produced stays retrievable, and your assistants keep answering from it, until you [sync the source](/api-reference/knowledge/sync-source). That sync reads the source under its new configuration, adds what now matches and removes what no longer does. This endpoint does not start it.

`configuration` replaces the stored configuration whole. It is not merged, so send every setting, not only the one you changed, and it is validated exactly as [Create a source](/api-reference/knowledge/create-source) validates it for the source's type. A source's type and collection cannot be changed: a body that names `source_type`, `collection_id` or `credential_ref` returns `400` rather than being ignored. The files of an `upload` source cannot be edited either; delete the source and upload again.

Setting `status` to `paused` stops the source being read: a sync of it fails and a [scheduled re-sync](/knowledge/connectors#scheduled-re-sync) skips it. Its documents stay and are still answered from. A run already in progress is not interrupted; [cancel the job](/api-reference/knowledge/cancel-job) for that. `active` resumes it.

Updating a source requires a role that can manage knowledge: Owner, Administrator, Editor or Knowledge operator. Syncing is a separate permission, so a caller may be able to save an update and not start the sync that applies it. Returns `404` for an ID that does not exist and for a source that belongs to another organization.

<ParamField path="source_id" type="string" required>
  Source ID (a UUID).
</ParamField>

<ParamField body="name" type="string">
  New display name, 1 to 255 characters after trimming.
</ParamField>

<ParamField body="configuration" type="object">
  The whole new configuration for the source's type, as [Create a
  source](/api-reference/knowledge/create-source) documents it. At most 50 keys, and each value at
  most 8,192 characters. Changing it sets `last_source_version` to `null` until the next sync
  completes.
</ParamField>

<ParamField body="status" type="string">
  `active` or `paused`. Any other value returns `400`.
</ParamField>

## Response

The updated source, in the same shape as [Get a source](/api-reference/knowledge/get-source).

<ResponseField name="id" type="string" required>
  Source ID (a UUID).
</ResponseField>

<ResponseField name="collection_id" type="string" required>
  Collection the source ingests into.
</ResponseField>

<ResponseField name="source_type" type="string" required>
  The `source_type` the source was created with.
</ResponseField>

<ResponseField name="name" type="string" required>
  Display name.
</ResponseField>

<ResponseField name="configuration" type="object" required>
  Stored configuration, after validation. Every value is a string.
</ResponseField>

<ResponseField name="status" type="string" required>
  `active`, `paused` or `disabled`.
</ResponseField>

<ResponseField name="last_source_version" type="string | null" required>
  `null` after a configuration change, until the next ingestion run ends `succeeded` or `partial`. A
  rename or a pause leaves it as it was.
</ResponseField>

<ResponseField name="last_ingested_at" type="string | null" required>
  ISO 8601 timestamp in UTC of the last ingestion run that ended `succeeded` or `partial`. `null` if
  never ingested.
</ResponseField>

<ResponseField name="created_at" type="string" required>
  ISO 8601 timestamp, in UTC.
</ResponseField>

<ResponseField name="updated_at" type="string" required>
  ISO 8601 timestamp, in UTC.
</ResponseField>

<RequestExample>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl --request PATCH "$MITHUNAI_URL/mithunai/api/v1/knowledge/sources/5d1e7a90-3c4b-4f2a-8e61-7b9c0d2f4a13" \
    --header "Authorization: Bearer $MITHUNAI_API_KEY" \
    --header "Content-Type: application/json" \
    --data '{ "status": "paused" }'
  ```

  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import os, requests

  source_id = "5d1e7a90-3c4b-4f2a-8e61-7b9c0d2f4a13"
  response = requests.patch(
      f"{os.environ['MITHUNAI_URL']}/mithunai/api/v1/knowledge/sources/{source_id}",
      headers={"Authorization": f"Bearer {os.environ['MITHUNAI_API_KEY']}"},
      json={"status": "paused"},
      timeout=60,
  )
  response.raise_for_status()
  print(response.json())
  ```

  ```javascript JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const sourceId = '5d1e7a90-3c4b-4f2a-8e61-7b9c0d2f4a13'
  const response = await fetch(
    `${process.env.MITHUNAI_URL}/mithunai/api/v1/knowledge/sources/${sourceId}`,
    {
      method: 'PATCH',
      headers: {
        Authorization: `Bearer ${process.env.MITHUNAI_API_KEY}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({ status: 'paused' }),
    },
  )
  console.log(await response.json())
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "id": "5d1e7a90-3c4b-4f2a-8e61-7b9c0d2f4a13",
    "collection_id": "0b6f2c14-8a3d-4e91-9c77-2f5b1d0a4e88",
    "source_type": "website",
    "name": "Product documentation site",
    "configuration": {
      "seed_url": "https://docs.example.com/",
      "path_prefix": "/guides",
      "max_depth": "3",
      "max_pages": "1000",
      "include_paths": "",
      "exclude_paths": "/guides/archive/"
    },
    "status": "paused",
    "last_source_version": null,
    "last_ingested_at": null,
    "created_at": "2026-09-24T10:16:30.119842",
    "updated_at": "2026-10-12T09:41:07.305518"
  }
  ```

  ```json 400 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  { "code": "validation_error", "message": "The update changes nothing." }
  ```

  ```json 403 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  { "code": "authorization_error", "message": "You do not have permission to perform this action." }
  ```

  ```json 404 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  { "code": "not_found", "message": "The knowledge source was not found." }
  ```
</ResponseExample>


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