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

# Update Knowledge Base

Modify knowledge base settings including name, description, status, progress, datasources, and configuration.

<ParamField path="kb_id" type="string" required>
  The knowledge base ID
</ParamField>

## Request Body

<ParamField body="name" type="string">
  Updated knowledge base name
</ParamField>

<ParamField body="status" type="string">
  Updated status: `pending`, `running`, `completed`, `failed`
</ParamField>

<ParamField body="progress" type="integer">
  Updated progress percentage (0-100)
</ParamField>

<ParamField body="datasources" type="array">
  Array of datasource IDs to include in this knowledge base
</ParamField>

<ParamField body="ingested_datasources" type="array">
  Array of datasource IDs that have been successfully ingested
</ParamField>

<ParamField body="failed_datasources" type="array">
  Array of datasource IDs that failed ingestion
</ParamField>

<ParamField body="chunking_strategy" type="object">
  Updated chunking strategy configuration
</ParamField>

<ParamField body="llm_config" type="object">
  Updated LLM configuration
</ParamField>

<ParamField body="embedding_config" type="object">
  Updated embedding configuration
</ParamField>

<ParamField body="processing_metadata" type="object">
  Updated processing metadata
</ParamField>

<Note>
  Most commonly updated fields are `name` and `description`. Other fields are typically managed by the system during ingestion.
</Note>

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PATCH https://api.artaios.ai/api/v1/knowledge-bases/kb_123/ \
    -H "x-api-key: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Updated Product Knowledge Base"
    }'
  ```

  ```python Python theme={null}
  import requests

  data = {
      "name": "Updated Product Knowledge Base"
  }

  response = requests.patch(
      "https://api.artaios.ai/api/v1/knowledge-bases/kb_123/",
      headers={"x-api-key": "YOUR_API_KEY"},
      json=data
  )
  ```

  ```javascript JavaScript theme={null}
  const data = {
    name: "Updated Product Knowledge Base"
  };

  const response = await fetch('https://api.artaios.ai/api/v1/knowledge-bases/kb_123/', {
    method: 'PATCH',
    headers: {
      'x-api-key': 'YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify(data)
  });
  ```
</CodeGroup>

## Response

Returns the updated knowledge base object with new `updated_at` timestamp.
