The JSON responses to POST requests lacks a Content-Type header. This is an issue if Nextcloud is running behind Apache's mod_proxy_html, which corrupts the response by wrapping it in \<html>/\<body> tags. For me the issue was fixed by adding ```php header("Content-Type: application/json"); ``` before sending the response to a POST request.