---
title: "Update a collection"
method: PATCH
path: "/collections/{collectionName}"
tags: ["collections"]
---

# Update a collection

`PATCH /collections/{collectionName}`

Update a collection's schema to modify the fields and their types.

## Path parameters

- `collectionName` string, required

## Request body

- CollectionUpdateSchema
  - `fields` Field[] — A list of fields for querying, filtering and faceting
    - `name` string, required
    - `type` string, required
    - `optional` boolean
    - `facet` boolean
    - `index` boolean
    - `locale` string
    - `sort` boolean
    - `infix` boolean
    - `reference` string — Name of a field in another collection that should be linked to this collection so that it can be joined during query.
    - `async_reference` boolean — Allow documents to be indexed successfully even when the referenced document doesn't exist yet.
    - `num_dim` integer
    - `drop` boolean
    - `store` boolean — When set to false, the field value will not be stored on disk. Default: true.
    - `vec_dist` string — The distance metric to be used for vector search. Default: `cosine`. You can also use `ip` for inner product.
    - `range_index` boolean — Enables an index optimized for range filtering on numerical fields (e.g. rating:>3.5). Default: false.
    - `stem` boolean — Values are stemmed before indexing in-memory. Default: false.
    - `stem_dictionary` string — Name of the stemming dictionary to use for this field
    - `token_separators` string[] — List of symbols or special characters to be used for splitting the text into individual words in addition to space and new-line characters.
    - `symbols_to_index` string[] — List of symbols or special characters to be indexed.
    - `embed` object
      - `from` string[], required
      - `model_config` object, required
        - `model_name` string, required
        - `api_key` string
        - `url` string
        - `access_token` string
        - `refresh_token` string
        - `client_id` string
        - `client_secret` string
        - `project_id` string
        - `indexing_prefix` string
        - `query_prefix` string
  - `synonym_sets` string[] — List of synonym set names to associate with this collection
  - `metadata` object — Optional details about the collection, e.g., when it was created, who created it etc.

## Response `200`

The updated partial collection schema

- CollectionUpdateSchema
  - `fields` Field[] — A list of fields for querying, filtering and faceting
    - `name` string, required
    - `type` string, required
    - `optional` boolean
    - `facet` boolean
    - `index` boolean
    - `locale` string
    - `sort` boolean
    - `infix` boolean
    - `reference` string — Name of a field in another collection that should be linked to this collection so that it can be joined during query.
    - `async_reference` boolean — Allow documents to be indexed successfully even when the referenced document doesn't exist yet.
    - `num_dim` integer
    - `drop` boolean
    - `store` boolean — When set to false, the field value will not be stored on disk. Default: true.
    - `vec_dist` string — The distance metric to be used for vector search. Default: `cosine`. You can also use `ip` for inner product.
    - `range_index` boolean — Enables an index optimized for range filtering on numerical fields (e.g. rating:>3.5). Default: false.
    - `stem` boolean — Values are stemmed before indexing in-memory. Default: false.
    - `stem_dictionary` string — Name of the stemming dictionary to use for this field
    - `token_separators` string[] — List of symbols or special characters to be used for splitting the text into individual words in addition to space and new-line characters.
    - `symbols_to_index` string[] — List of symbols or special characters to be indexed.
    - `embed` object
      - `from` string[], required
      - `model_config` object, required
        - `model_name` string, required
        - `api_key` string
        - `url` string
        - `access_token` string
        - `refresh_token` string
        - `client_id` string
        - `client_secret` string
        - `project_id` string
        - `indexing_prefix` string
        - `query_prefix` string
  - `synonym_sets` string[] — List of synonym set names to associate with this collection
  - `metadata` object — Optional details about the collection, e.g., when it was created, who created it etc.

## Other responses

- `400` — Bad request, see error message for details
- `404` — The collection was not found

## Changes

> 9 revisions in range; 1 could not be searched.

- **2026-03-23** `5c298bd6421a` — 2 info
  - added the new optional request property `fields/items/async_reference`
  - added the optional property `fields/items/async_reference` to the response with the `200` status
- **2025-10-14** `3bc6fc9b6132` — 28 info
  - added the new optional request property `fields/items/embed/model_config/indexing_prefix`
  - added the new optional request property `fields/items/embed/model_config/query_prefix`
  - added the new optional request property `fields/items/embed/model_config/refresh_token`
  - added the new optional request property `fields/items/embed/model_config/url`
  - …24 more
- **2024-02-13** `14b1d3553228` — 11 info
  - added the new optional request property `fields/items/embed`
  - added the new optional request property `fields/items/num_dim`
  - the `facet` request property default value `false` was removed
  - the `optional` request property default value `false` was removed
  - …7 more
- **2022-08-04** `6c2fe01b69bc` — 1 breaking, 26 warning, 8 info
  - the request property `fields` became required
  - removed the request property `fields/items/async_reference`
  - removed the request property `fields/items/embed`
  - removed the request property `fields/items/num_dim`
  - …31 more

[Change history](https://skmtc.dev/typesense/apis/typesense-api/changes/collections/:collectionName/patch.md)

---

[API](https://skmtc.dev/typesense/apis/typesense-api.md) · [All operations](https://skmtc.dev/typesense/apis/typesense-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/typesense/typesense-api/revisions/1d9b3b61638e/schema)
