---
title: "Update a knowledge store"
method: PATCH
path: "/knowledge-stores/{knowledge_store_id}"
tags: ["knowledgeStores"]
---

# Update a knowledge store

`PATCH /knowledge-stores/{knowledge_store_id}`

This method updates the specified knowledge store. Only the `name`, `description`, and `metadata` fields can be updated.

## Path parameters

- `knowledge_store_id` string, required

## Headers

- `x-api-key` string, required

## Request body

- object
  - `name` string — The name of the knowledge store.
  - `description` string — An optional description of the knowledge store.
  - `metadata` object — Custom metadata for the knowledge store. Both keys and values must be strings. The provided object replaces the existing metadata in full, so include every key you want to keep. To clear all metadata, set this field to an empty object (`{}`). A null value is stored as an empty string.

## Response `200`

The knowledge store has been successfully updated.

- KnowledgeStore — A knowledge store contains your videos and images plus the understanding the platform derives from them: spatiotemporal context, a typed ontology, and embeddings for semantic retrieval. It is the corpus agents reason over: the full collection, not just individual clips.
  - `_id` string — The unique identifier of the knowledge store.
  - `name` string — The name of the knowledge store.
  - `description` string — An optional description of the knowledge store.
  - `ingestion_config` IngestionConfig — Configuration that controls how content added to the knowledge store is processed.
    - `enrichment_config` union, required — Metadata enrichment configuration. The `type` field selects one variant: - `type: json_schema` - Structured extraction conforming to a provided JSON Schema. - `type: description` - Natural-language instructions that the platform converts into a schema internally.
      - object — Structured extraction conforming to a provided JSON Schema.
        - `type` 'json_schema', required — Must be `"json_schema"`. Identifies this as the structured extraction variant.
        - `json_schema` EnrichmentConfigJsonSchemaJsonSchema, required — A JSON Schema (draft 2020-12) that defines the structure of metadata to extract from each video shot. The platform accepts only the JSON Schema keywords listed below; unknown keywords return a `422` error. Keep schemas focused — deeply nested or overly complex schemas may degrade extraction quality. **Supported keywords** | Category | Keywords | |---|---| | Core | `type`, `title`, `description`, `enum` | | Object | `properties`, `required`, `additionalProperties` | | Array | `items`, `prefixItems`, `minItems`, `maxItems` | | Number | `minimum`, `maximum` | | String | `format` | Notes: - The root `type` keyword must be `"object"`. - Every entry under the `properties` keyword (including nested ones) must include a `description` field. This text guides extraction quality. - The `required` keyword behaves as in standard JSON Schema. - The `additionalProperties` keyword accepts a boolean value (`true` or `false`). Use `false` to enforce strict shapes. The platform does not support schema-valued forms. - **Unknown keywords return `422` — they are not silently ignored.** If you generate schemas programmatically (for example, using `pydantic.model_json_schema()`), strip annotative keywords such as `default`, `examples`, and `readOnly` before submitting. - **The platform does not support nullable fields.** This includes both `nullable: true` and `type: ["string", "null"]`. To express an optional field, omit it from the `required` array — the platform omits the field from the result when no value is present. **Not supported (returns `422`)** - Schema composition: `anyOf`, `allOf`, `oneOf`, `not` - Conditional schemas: `if` / `then` / `else` - Property dependencies: `dependentSchemas`, `dependentRequired` - Object size constraints: `minProperties`, `maxProperties` - String constraints: `pattern`, `minLength`, `maxLength` - Number constraints: `exclusiveMinimum`, `exclusiveMaximum`, `multipleOf` - Value constraints: `const` - Null handling: `nullable`, `type` arrays (e.g., `["string", "null"]`) - Annotative keywords: `default`, `examples`, `readOnly`, `writeOnly` - References and reuse: `$ref`, `$defs`, `definitions` - Any other keyword not listed under "Supported keywords" above
          - `type` 'object', required — The top-level type of the schema. Must be `"object"`. Primitive and array top-level types are not supported. The platform uses this object structure to map extracted metadata to named fields.
          - `properties` object, required — A map of property names to their JSON Schema definitions. Each property must include a field named `description`. The platform uses this field to guide extraction quality. Omitting it returns a `422` error.
      - object — Natural-language instructions that the platform converts into a JSON Schema internally.
        - `type` 'description', required — Must be `"description"`. Identifies this as the natural-language variant.
        - `description` string, required — A natural-language description of what knowledge should be extracted from the videos. The platform converts this into a JSON Schema internally.
  - `item_count` integer — The number of items in the knowledge store.
  - `created_at` string, date-time — The date and time when the knowledge store was created, in the RFC 3339 format.
  - `updated_at` string, date-time — The date and time when the knowledge store was last updated, in the RFC 3339 format.
  - `metadata` object — Custom metadata for the knowledge store.

## Other responses

- `400` — The request has failed.

---

[API](https://skmtc.net/twelvelabs/apis/twelvelabs-api.md) · [All operations](https://skmtc.net/twelvelabs/apis/twelvelabs-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/twelvelabs/twelvelabs-api/revisions/5dbd6e8473c9/schema)
