---
title: "PATCH /orgs/{org_id}/k2/{kb_id}"
method: PATCH
path: "/orgs/{org_id}/k2/{kb_id}"
tags: ["k2"]
---

# PATCH /orgs/{org_id}/k2/{kb_id}

`PATCH /orgs/{org_id}/k2/{kb_id}`

Update a knowledge base.

## Path parameters

- `org_id` string, required
- `kb_id` string, required

## Request body

- EditK2Request
  - `auto_processing_enabled` boolean, nullable — Toggle the automatic parsing, chunking, and embedding pipeline for new file uploads. When false, uploads are stored as-is. Existing files are not affected.
  - `backup_enabled` boolean, nullable — DEPRECATED and ignored: backups are system-managed for every KB; this flag gates nothing. Accepted for old clients, never applied.
  - `backup_retention_days` integer, nullable — DEPRECATED and ignored: snapshot retention is system-managed (keep-last-N). Accepted for old clients, never applied.
  - `backup_s3_bucket` string, nullable
  - `backup_s3_key_prefix` string, nullable
  - `backup_schedule_cron` string, nullable — DEPRECATED and ignored: superseded by `backup_window_utc_hour`. Accepted for old clients, never applied.
  - `backup_window_utc_hour` integer, nullable — UTC hour (0–23) when this KB's fixed daily backup may run. Set `null` to reset to the fleet default (01:00 UTC).
  - `description` string, nullable
  - `name` string, nullable

## Response `200`

Updated knowledge base

- K2Detail
  - `auto_processing_enabled` boolean, required — When false, file uploads to this knowledge base are stored as-is and skipped by the automatic parsing, chunking, and embedding pipeline.
  - `backup_enabled` boolean, required — DEPRECATED: backups are system-managed for every KB (idle teardown + daily window pass); this flag gates nothing. Still returned for existing clients; PATCH ignores it.
  - `backup_last_completed_at` string, date-time, nullable
  - `backup_last_error` string, nullable
  - `backup_last_started_at` string, date-time, nullable
  - `backup_last_status` string, nullable
  - `backup_retention_days` integer, nullable
  - `backup_s3_bucket` string, nullable
  - `backup_s3_key_prefix` string, nullable
  - `backup_schedule_cron` string, nullable — DEPRECATED: never had a cron behind it; superseded by `backup_window_utc_hour`. Still returned for existing clients; PATCH ignores it.
  - `backup_window_utc_hour` integer, nullable — UTC hour (0–23) of this KB's daily backup window; `null` = fleet default (01:00 UTC). The daily cadence itself is fixed.
  - `created_at` string, date-time, required
  - `data_size_bytes` integer, required
  - `description` string, nullable
  - `governance_mode` 'off' | 'shadow' | 'enforce', required — Per-KB query governance mode.
  - `id` integer, required
  - `index_count` integer, required
  - `name` string, required
  - `row_count` integer, required
  - `table_count` integer, required
  - `uid` string, required
  - `updated_at` string, date-time, required
  - `vector_count` integer, required

## Changes

- **2026-07-17** `33e77c7fd113` — 7 info
  - added the new optional request property `backup_window_utc_hour`
  - request property `backup_enabled` deprecated
  - request property `backup_retention_days` deprecated
  - request property `backup_schedule_cron` deprecated
  - …3 more
- **2026-07-03** `e1c81d0f4235` — 1 breaking, 1 info
  - removed the required property `governance_enforced` from the response with the `200` status
  - added the required property `governance_mode` to the response with the `200` status
- **2026-06-05** `45de91fcec33` — 1 info
  - added the required property `governance_enforced` to the response with the `200` status
- **2026-05-18** `cd5b6fad189e` — 2 info
  - added the new optional request property `auto_processing_enabled`
  - added the required property `auto_processing_enabled` to the response with the `200` status
- **2026-04-17** `91d10d3c5c55` — 1 info
  - endpoint added

[Full history](https://skmtc.dev/timbal-ai/apis/timbal-platform-api/changes/orgs/:org_id/k2/:kb_id/patch.md)

---

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