---
title: "Update collection"
method: PUT
path: "/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}"
tags: ["Collection"]
---

# Update collection

`PUT /api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}`

Updates an existing collection's name or metadata.

## Path parameters

- `tenant` string, required
- `database` string, required
- `collection_id` string, required

## Request body

- UpdateCollectionPayload
  - `new_configuration` UpdateCollectionConfiguration
    - `embedding_function` union
      - object
        - `type` 'legacy', required
      - object
        - `config` unknown, required
        - `name` string, required
        - `type` 'known', required
      - object
        - `type` 'unknown', required
    - `hnsw` UpdateHnswConfiguration
      - `batch_size` integer, nullable
      - `ef_search` integer, nullable
      - `max_neighbors` integer, nullable
      - `num_threads` integer, nullable
      - `resize_factor` number, double, nullable
      - `sync_threshold` integer, nullable
    - `spann` UpdateSpannConfiguration
      - `ef_search` integer, nullable
      - `search_nprobe` integer, nullable
  - `new_metadata` HashMap
  - `new_name` string, nullable

## Response `200`

Collection updated successfully

- UpdateCollectionResponse

## Other responses

- `401` — Unauthorized
- `404` — Collection not found
- `500` — Server error

---

[API](https://skmtc.dev/trychroma/apis/chroma-frontend.md) · [All operations](https://skmtc.dev/trychroma/apis/chroma-frontend/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/trychroma/chroma-frontend/revisions/9b96550f70f6/schema)
