---
title: "Update a collection"
method: PUT
path: "/v1/rag/collections/{collectionId}"
tags: ["RAG"]
---

# Update a collection

`PUT /v1/rag/collections/{collectionId}`

## Request

- Base URL: `http://localhost:9998`
- URL: `http://localhost:9998/v1/rag/collections/{collectionId}`
- Auth: HTTP bearer

## Request body

- object
  - `name` string
  - `folderPath` string: A new folder to index, refused by the same rules as on create.
  - `embeddingModelStem` string
  - `chunkSize` integer
  - `chunkOverlap` integer

## Response `200`

Updated collection

- RagCollection
  - `id` string, required
  - `name` string, required
  - `folderPath` string, required
  - `embeddingModelStem` string, required
  - `chunkSize` integer, required
  - `chunkOverlap` integer, required
  - `status` 'empty' | 'indexed' | 'stale' | 'error', required
  - `lastIndexedAt` string, date-time, nullable
  - `documentCount` integer, required
  - `chunkCount` integer, required
  - `dimensions` integer, required
  - `errorMessage` string, nullable
  - `projectId` string: The project whose knowledge this collection is; it indexes that project's materials and is changed through the project. Absent for a collection a person made.

## Other responses

- `404`: Resource not found

---

[API](https://skmtc.dev/modelpiper/apis/toolpiper-api.md) · [All operations](https://skmtc.dev/modelpiper/apis/toolpiper-api/llms.txt) · [OpenAPI document](https://skmtc.dev/modelpiper/apis/toolpiper-api/revisions/6722bf56385c?raw)
