> ## Documentation Index
> Fetch the complete documentation index at: https://algolia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# algolia synonyms save

> Add a synonym to an index.

```txt Usage theme={"system"}
algolia synonyms save <index> --id <id> --synonyms <synonyms> [flags]
```

## Examples

Save one standard synonym with ID "1" and "foo" and "bar" synonyms to the "MOVIES" index:

```sh icon=square-terminal theme={"system"}
algolia synonyms save MOVIES --id 1 --synonyms foo,bar
```

## Flags

<ParamField body="-c, --corrections">
  A list of corrections of the word (alt correction synonyms only)
</ParamField>

<ParamField body="-f, --forward-to-replicas">
  Whether to add the synoynm to replicas
</ParamField>

<ParamField body="-i, --id">
  Synonym ID to save
</ParamField>

<ParamField body="-n, --input">
  Word of phrases to appear in query strings (one-way synonyms only)
</ParamField>

<ParamField body="-l, --placeholder">
  Placeholder token to represent a synonym within records
</ParamField>

<ParamField body="-r, --replacements">
  Query words that will match the placeholder synonym token
</ParamField>

<ParamField body="-s, --synonyms">
  Synonyms to save
</ParamField>

<ParamField body="-t, --type">
  Synonym type to save (default to regular)
</ParamField>

<ParamField body="--wait">
  Wait for the operation to complete
</ParamField>

<ParamField body="-w, --word">
  A single word, used as the basis for the array of corrections (alt-correction synonyms only)
</ParamField>

## Output formatting flags

<ParamField body="--allow-missing-template-keys">
  If true, ignore errors in templates due to missing fields or map keys. This only applies to golang and jsonpath output formats.
</ParamField>

<ParamField body="-o, --output">
  Output format. One of: (json, jsonl, ndjson, jsonpath, jsonpath-as-json, jsonpath-file).
</ParamField>

<ParamField body="--template">
  Template string or path to a template file to use when --output=jsonpath, --output=jsonpath-file.
</ParamField>
