Parsing error using cURL as shell_command

Hi there,
I’m trying to reboot my router using its api and curl:

shell_command:
reboot_router: curl -4 -k --anyauth -u "username:password" "http://routerip:49000/upnp/control/deviceconfig" -H 'Content-Type: text/xml; charset="utf-8"' -H 'SoapAction: urn:dslforum-org:service:DeviceConfig:1#Reboot' -d '<?xml version="1.0" encoding="utf-8"?> <s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <u:Reboot xmlns:u="urn:dslforum-org:service:DeviceConfig:1"/> </s:Body> </s:Envelope>'

doing a syntax check I’d always get a:

Error loading /config/configuration.yaml: while parsing a block mapping in "/config/configuration.yaml", line 176, column 3 expected <block end>, but found '<scalar>'

I can’t change the shell command - is there any way to get this working?

Does the command work in a terminal?
If yes, you can put it in a shell script and call this script with the shell_command.