Cloud API Particle Publish passing JSON?

That certainly works (not sure if that's the exact syntax is correct, but that's the gist of it. Those cURL parameters are nothing more than parts of the HTML request.

This topics is a nice tutorial about connecting with the API using HTML requests:

For tinkering, I can also suggest Postman to easily play around with requests (it also generates the necessary code for you then :))