I am developing a PowerShell module to interact with the Web Help Desk API in order to facilitate integration with various systems. One of the requirements is that I need to be able to add an attachment to tickets. A sample of the proof of concept script I have is here (with sensitive data substituted for dummy values).
When I run the script, I get a 400 error and the following message:
{"cause":"ENTITY_NOT_FOUND","reason":"ENTITY_NOT_FOUND"}
I have also tried using Postman, and I get the same result.
Please note that the entityId in the querystring is a valid ticket number in our system, and I was able to successfully upload an attachment to that ticket through the UI with the user that the API key I'm using belongs to, so it shouldn't be a permissions issue.
We are currently have version 12.7.1 of Web Help Desk.