使用PHP通过CURL发布对象

We are attempting to post to a rest API endpoint that requires a "POST object" within one of the keys. In javascript/jquery, this works fine. But, using CURL in PHP the endpoint doesn't receive the object (called "components") here:

    $ch = curl_init();

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
    curl_setopt($ch, CURLOPT_URL, 'http://api.sitesitesite.com');

    $comps = array('slug' => "xyz",
                   'visble' => 1,
                   'color' => "xyz",
                   'shape' => "xyz",
                   'version' => "2",
            );

    $post_args = array();
    $post_args['components'] = $comps;
    $post_args['id'] = $id;

    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_args);

    $result = curl_exec($ch);

    $http_status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    curl_close($ch);

Get rid of "CURLOPT_CUSTOMREQUEST" and use "CURLOPT_POST"

curl_setopt($ch, CURLOPT_POST, true);