---
title: "Create or update a synonym set"
method: PUT
path: "/synonym_sets/{synonymSetName}"
tags: ["synonyms"]
---

# Create or update a synonym set

`PUT /synonym_sets/{synonymSetName}`

Create or update a synonym set with the given name

## Path parameters

- `synonymSetName` string, required

## Request body

- SynonymSetCreateSchema
  - `items` SynonymItemSchema[], required — Array of synonym items
    - `id` string, required — Unique identifier for the synonym item
    - `synonyms` string[], required — Array of words that should be considered as synonyms
    - `root` string — For 1-way synonyms, indicates the root word that words in the synonyms parameter map to
    - `locale` string — Locale for the synonym, leave blank to use the standard tokenizer
    - `symbols_to_index` string[] — By default, special characters are dropped from synonyms. Use this attribute to specify which special characters should be indexed as is

## Response `200`

Synonym set successfully created/updated

- SynonymSetSchema
  - `items` SynonymItemSchema[], required — Array of synonym items
    - `id` string, required — Unique identifier for the synonym item
    - `synonyms` string[], required — Array of words that should be considered as synonyms
    - `root` string — For 1-way synonyms, indicates the root word that words in the synonyms parameter map to
    - `locale` string — Locale for the synonym, leave blank to use the standard tokenizer
    - `symbols_to_index` string[] — By default, special characters are dropped from synonyms. Use this attribute to specify which special characters should be indexed as is
  - `name` string, required — Name of the synonym set

## Other responses

- `400` — Bad request, see error message for details

---

[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)
