# Updating synonyms via ElasticSearch REST api?

**URL:** <https://discuss.elastic.co/t/updating-synonyms-via-elasticsearch-rest-api/34276>\
**Category:** Elasticsearch\
**Created:** [November 10, 2015, 6:57pm UTC](https://discuss.elastic.co/t/updating-synonyms-via-elasticsearch-rest-api/34276 "2015-11-10T18:57:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dunglan](https://avatars.discourse-cdn.com/v4/letter/d/e79b87/32.png) [@dunglan](https://discuss.elastic.co/u/dunglan)\
**Post date:** [November 10, 2015, 6:57pm UTC](https://discuss.elastic.co/t/updating-synonyms-via-elasticsearch-rest-api/34276/1 "2015-11-10T18:57:01Z")

</div>

I am writing a code to create elasticsearch indexes with the constraint that everything must be done through the elasticsearch REST APIs.

I am able to create the index, update the mapping and settings with the Java client but I am stuck on how to do the same with the synonyms file.

Is there a way to update synonyms via the elasticsearch REST API?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 11, 2015, 6:20am UTC](https://discuss.elastic.co/t/updating-synonyms-via-elasticsearch-rest-api/34276/2 "2015-11-11T06:20:53Z")

</div>

Have you seen [https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-synonym-tokenfilter.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-synonym-tokenfilter.html)?  
It shows both file and API methods.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:39pm UTC](https://discuss.elastic.co/t/updating-synonyms-via-elasticsearch-rest-api/34276/3 "2017-07-05T23:39:20Z")

</div>


