---
title: "Edit Datastore Configuration"
method: PUT
path: "/datastores/{datastore_id}"
tags: ["/datastores"]
---

# Edit Datastore Configuration

`PUT /datastores/{datastore_id}`

## Path parameters

- `datastore_id` string, uuid, required — ID of the datastore to edit

## Request body

- EditDatastoreInput — Input model for editing a datastore.
  - `name` string — Name of the datastore
  - `configuration` UnstructuredDatastoreConfigModel — Configuration for unstructured datastores.
    - `parsing` DatastoreParseConfiguration — Configuration for data extraction settings from documents at datastore level. Controls settings for document parsing. Includes those from `/parse` API along with some extra ingestion-only ones.
      - `figure_captioning_prompt` string — Prompt to use for generating image captions. Must be non-empty if `figure_caption_mode` is `custom`. Otherwise, must be null.
      - `figure_caption_mode` 'default' | 'custom' | 'ignore' — Mode for figure captioning. - `default`: Use the default figure prompt, which generates a detailed caption for each figure. - `custom`: Use a custom prompt. - `ignore`: Disable figure captioning.
      - `enable_split_tables` boolean — Whether to enable table splitting, which splits large tables into smaller tables with at most `max_split_table_cells` cells each. In each split table, the table headers are reproduced as the first row(s). This is useful for preserving context when tables are too large to fit into one chunk.
      - `max_split_table_cells` integer — Maximum number of cells for split tables. Ignored if `enable_split_tables` is False.
    - `chunking` ChunkingConfiguration — Configuration for document chunking settings.
      - `chunking_mode` 'hierarchy_depth' | 'hierarchy_heading' | 'static_length' | 'page_level' — Defines available chunking strategies. - `hierarchy_depth`: Creates a new chunk whenever a higher-level section heading is encountered. - `hierarchy_heading`: Creates a new chunk whenever any section heading is encountered. - `static_length`: Creates chunks of a fixed length. - `page_level`: Creates chunks that cannot run over page boundaries.
      - `max_chunk_length_tokens` integer — Target maximum length of text tokens chunks for chunking. Chunk length may exceed this value in some edge cases.
      - `min_chunk_length_tokens` integer — Target minimum length of chunks in tokens. Must be at least 384 tokens less than `max_chunk_length_tokens`. Chunk length may be shorter than this value in some edge cases. Ignored if `chunking_mode` is `page_level`.
      - `enable_hierarchy_based_contextualization` boolean — Whether to enable section-based contextualization for chunking
    - `html_config` HtmlConfiguration — Configuration for HTML document ingestion settings.
      - `max_chunk_length_tokens` integer — Target maximum length of text tokens chunks for chunking. Chunk length may exceed this value in some edge cases.

## Response `200`

Successful Response

- EditDatastoreOutput
  - `id` string, uuid, required — ID of the datastore

## Other responses

- `422` — Validation Error

## Changes

- **2025-08-26** `db7245c74772` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/contextualai/apis/endpoints/changes/datastores/:datastore_id/put.md)

---

[API](https://skmtc.dev/contextualai/apis/endpoints.md) · [All operations](https://skmtc.dev/contextualai/apis/endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/contextualai/endpoints/revisions/ca7f807eec8b/schema)
