You declared you were posting JSON
And then posted a form.
The form layout isn’t correct for POSTing as a form.
It’s easier to send as JSON. So
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($object));
Should do the trick rather than http_build_query