---
title: "Update a datasource"
method: PATCH
path: "/v2/knowledge/{knowledge_id}/datasources/{datasource_id}"
tags: ["Knowledge Bases"]
---

# Update a datasource

`PATCH /v2/knowledge/{knowledge_id}/datasources/{datasource_id}`

Updates the display name of a datasource.

## Path parameters

- `knowledge_id` string, required
- `datasource_id` string, required

## Request body

- DatasourcesServiceUpdateRequest
  - `display_name` string, required
  - `description` string, nullable

## Response `200`

Datasource successfully updated

- Datasource
  - `display_name` string, required
  - `description` string, nullable — The description of the knowledge base
  - `status` 'pending' | 'processing' | 'completed' | 'failed' | 'queued', required
  - `file_id` string, nullable — The unique identifier of the file used to create the datasource.
  - `created` string, required
  - `updated` string, required
  - `created_by_id` string, uuid, nullable — The user ID of the creator of the knowledge base
  - `update_by_id` string, uuid, nullable — The user ID of the last user who updated the knowledge base
  - `knowledge_id` string, required
  - `chunks_count` number, double, required
  - `processing_attempts` ProcessingAttempt[] — Additive compatibility fields formerly available only from database-shaped responses.
    - `id` string, required
    - `started_at` string, required
    - `queued_at` string
    - `completed_at` string
    - `errors` ProcessingError[]
      - `code` integer
      - `message` string
    - `retryable` boolean
  - `metadata` CountMetadata
    - `words_count` number, double
    - `sentences_count` number, double
    - `paragraphs_count` number, double
    - `tokens_count` number, double
    - `characters_count` number, double
    - `chunks_count` number, double
  - `attachment` DatasourceAttachment
    - `id` string
    - `object_name` string
  - `_id` string, required

## Changes

> 251 revisions in range; 71 not diffed, 130 could not be searched.

- **2026-08-02** `6f132f005b2a` — 2 breaking, 5 info
  - the `created_by_id` response's property type/format changed from `string, null`/`` to `string, null`/`uuid` for status `200`
  - the `update_by_id` response's property type/format changed from `string, null`/`` to `string, null`/`uuid` for status `200`
  - the response optional property `created_by_id` became read-only for the status `200`
  - the response optional property `update_by_id` became read-only for the status `200`
  - …3 more
- **2026-07-10** `5f95063ab4fd` — 1 info
  - the `_id` response's property default value changed from `01KX57CTSHPRC5Q9P3YWVN2F8T` to `01KX5B25PHCSY9Z6GNAVJMAXZE` for the status `200`
- **2026-07-10** `99dc842bd41f` — 1 info
  - the `_id` response's property default value changed from `01KX3D75MMN0T6H9XJXN3S6834` to `01KX57CTSHPRC5Q9P3YWVN2F8T` for the status `200`
- **2026-07-09** `cddd6848f968` — 1 info
  - the `_id` response's property default value changed from `01KX2XC0QGPYXQ1J2K2JCZQVYC` to `01KX3D75MMN0T6H9XJXN3S6834` for the status `200`
- **2026-07-09** `e3d303f1c08c` — 1 info
  - the `_id` response's property default value changed from `01KX1SKS17XVAJCT1ECS84RTS2` to `01KX2XC0QGPYXQ1J2K2JCZQVYC` for the status `200`

[Full history](https://skmtc.dev/orq-ai/apis/orq-ai-api/changes/v2/knowledge/:knowledge_id/datasources/:datasource_id/patch.md)

---

[API](https://skmtc.dev/orq-ai/apis/orq-ai-api.md) · [All operations](https://skmtc.dev/orq-ai/apis/orq-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/orq-ai/orq-ai-api/revisions/9642bb8e4f83/schema)
