Skip to main content
Required ACL: editSettings Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the batch operation.

Usage

// Initialize the client
var client = new SearchClient(new SearchConfig("ALGOLIA_APPLICATION_ID", "ALGOLIA_API_KEY"));

// Call the API
var response = await client.SaveSynonymAsync(
  "<YOUR_INDEX_NAME>",
  "id1",
  new SynonymHit
  {
    ObjectID = "id1",
    Type = Enum.Parse<SynonymType>("Synonym"),
    Synonyms = new List<string> { "car", "vehicule", "auto" },
  },
  true
);
// >LOG

See the full API reference

For more details about input parameters and response fields.
I