This curl command works as desired:
curl -H \"X-Api-Key:j65k423lj4k2l3fds\" ` -X PUT ` -d \"alerts_enabled=true\" ` https://some/working/fi
This works for me in Powershell using the curl alias to Invoke-WebRequest...
curl -H @{"X-Api-Key" = "j65k423lj4k2l3fds"} -Method PUT 'https://some/working/file.xml'