If a synonym with the specified object ID doesn’t exist, Algolia adds a new one.
Otherwise, the existing synonym is replaced.
To add multiple synonyms in a single API request, use the batch operation.
editSettingsYour Algolia application ID.
Your Algolia API key with the necessary permissions to make the request. Permissions are controlled through access control lists (ACL) and access restrictions. The required ACL to make a request is listed in each endpoint's reference.
Name of the index on which to perform the operation.
"ALGOLIA_INDEX_NAME"
Unique identifier of a synonym object.
"synonymID"
Whether changes are applied to replica indices.
Synonym object.
Unique identifier of a synonym object.
"synonymID"
Synonym type.
synonym, onewaysynonym, altcorrection1, altcorrection2, placeholder, oneWaySynonym, altCorrection1, altCorrection2 "onewaysynonym"
Words or phrases considered equivalent.
["vehicle", "auto"]Word or phrase to appear in query strings (for onewaysynonyms).
"car"
Word or phrase to appear in query strings (for altcorrection1 and altcorrection2).
"car"
Words to be matched in records.
["vehicle", "auto"]Placeholder token to be put inside records.
"<Street>"
OK
Unique identifier of a task.
A successful API response means that a task was added to a queue.
It might not run immediately.
You can check the task's progress with the task operation and this task ID.
1514562690001
Date and time when the object was updated, in RFC 3339 format.
"2023-07-04T12:49:15Z"
Unique identifier of a synonym object.
"12"