Hey, I'm trying to do my very first POST API call and currently getting stuck. I know there are other solutions for what I'm trying to do, but I'm also trying to learn something rather than straight...
It also took me a bit of back and forth to get it working. Reasons are due to Khoros Classic using an older version of jQuery and some specific JSON requirements:
Since Classic's jQuery version is older you need to use type: "POST" instead of method: "POST"
The contentType "application/json" needs to be specified
data parameter needs to be stringified (you already were on the right tracke with your v2)
Here's the resulting evolution of your v1 code that works on my end:
Bonus tip: Looking at the details in your browser's network tab will reveal that quite often the HTTP error code is hiding a different more detailed "developer message" debug info in the return data. E.g. here's a HTTP 500 error that is hiding a message about non-stringified content: