Given that its a windows batch file, I would guess you’re in quotation mark hell. I spent an entire weekend trying to get NUT to talk to HA on windows and I swear at least 75% of the time was trying to figure out how to get quotation marks to work correctly in batch files.
Do you have @echo off at the top of your batch file? If so remove it so it actually outputs each command as it runs. Make sure they look right.
Also is it actually a batch file or a powershell script? Because escaping quotation marks has entirely different rules there. And is that actually the command being run or do you have variables for pieces? Because that added all sorts of complications for me with how windows handles variable substitution.
If it helps, here is a batch script I made and confirmed working that uses curl to call HA’s API from a windows machine. It’s not the same API but could copy and tweak it to your needs.
I agree with CentralCommand’s comment regarding the quotes. Quotes (both single and double) are a real pain to deal with in Windows, whether directly at a command prompt or in a batch file. At least you’re not using any percent signs ‘%’, as those are another pain point as well.