Sorry for being a pest. I thought I had this all working but I have now hit another issue.
$newdomain = "12.345.45.678";
$myemails = $xmlapi->api2_query($account, "MysqlFE", "authorizehost", array('host'=>$newdomain) );
I am able to add 12.345.45.678 to my access hosts list through the above code. I logged into cPanel to verify. But when I test the connection, I actually have no access.
If I remove the ip address manually in cPanel....then manually add it again in cPanel.....then my connection works.