A 400 error code means you’ve not supplied a valid AppId in the URL.
https://docs.mendix.com/apidocs-mxsdk/apidocs/deploy-api/#363-output
You can find AppIds for your projects using a call to the Retrieve Apps endpoint.
https://docs.mendix.com/apidocs-mxsdk/apidocs/deploy-api/#list-apps
I hope this helps.