-d switch automaticaly uses POST method, so if your curl command works, you can use POST. And to set post data, you can do:
curl_setopt($ch, CURLOPT_POSTFIELDS, 'api_user=your_sendgrid_username&...');
or to have automatic urlencoding, use array
curl_setopt($ch, CURLOPT_POSTFIELDS, array('api_user' => 'your_sendgrid_username' ...));