How does one create a private note with an attachment using the API?
The ‘private’ value must be a boolean or the API returns a 400 response. Attachment uploads should be multipart form data which will stringify the value.
I noticed that all notes with attachments are being created as private notes even without the ‘private’ value set, but I don’t want to rely on that because the API documentation says that ‘private’ should be set to true when creating a private note
There are a few examples online for adding attachments to notes but none of them address the ‘private’ flag, e.g. https://github.com/freshworks/fresh-samples/tree/master/PHP
Best answer by BillRichardsView original
The solution when posting multipart to add attachments is to send the value of ‘private’ as a string ‘true’. It seems like the Freshdesk API is handling the string ‘true’ but does not handle other truthy non-booleans like ‘1’ which is probably what’s posted for a multipart boolean value.