I am trying to include a tag when I am calling the Freshdesk outbound_email API, in the API docs it says the type for tags is an array of strings, so I want to send something like ["tag1", "tag2", tag3"] but I am not sure how to add it as a parameter with restsharp.
I have tried doing request.AddParameter but it won't accept an array as a parameter.
I have also tried doing JSON convert and then adding it as a parameter but the end point doesn't accept it.
This was confusing for me at first as well, since the Freshdesk API says that tags are a string array. It appears that the
tags[]parameter only works when sending strings, and not arrays or lists (when sending fromRestSharpat least)!The incorrect way to set tags, which results in the tag showing up as a
System.String[]in Freshdesk:The correct way to set tags, which adds a parameter per tag (you can also just reuse the
AddParameterline for however many you need):