I am pretty sure the response {"error":"undefined method end_with?’ for nil:NilClass"}` is a bug. Where do you report bugs in the API itself? (Details below)
Thanks, I’ve just tried the same request but with only those fields in the JSON object, and even in the order you listed, and I still get the exact same response, but I did eventually get it working by explicitly setting Content-Type header needs to be explicitly set by adding the option -H 'Content-Type: application/json'. (I also raised this on the GitHub issue tracker you linked.)