POST requests to Bing Webmaster API always gives NotAuthorized

I'm trying to programmatically submit sitemap index files to Bing via HTTP POST requests. I followed the JSON request example from their documentation page.

Here is the request I'm trying to make in cURL (I replaced the site url and apikey):

curl -XPOST -H 'Host: ssl.bing.com' -H "Content-type: application/json" -d '{
"siteUrl":"https:\/\/www.example.com",
"feedUrl":"https:\/\/www.example.com\/Sitemaps\/SitemapIndex--stuff--01.xml"
}' 'https://bing.com/webmaster/api.svc/json/SubmitFeed?apikey=MY_KEY'

The response looks like this:

{
    "ErrorCode": 14,
    "Message": "ERROR!!! NotAuthorized"
}

The api key is generated from the Bing webmaster ui portal. My user has administrator rights. Adding a Content-Length header did not help.

GET requests work alright and I can retrieve feed or traffic information.

In the Bing webmaster portal UI page I can submit sitemap files with no problem.

I've searched the web for this before asking and I could not find anything relevant. Has anyone encountered this problem also? Probably I'm missing something and I would appreciate some advice.