Found a workaround.
The whole reason I needed the server ip address was so that I could setup the domain through the API which doesn't allow you to set the IP of the domain to an empty string. Reason I wanted to set it to an empty string is so the domain would use the server's primary IP without actually assigning it in SmarterMail (it makes moving the server when upgrading easier).
So to get around this, I initially set the domain assigning it an IP and then immediately call SetRequestedDomainSettings() passing in `["serverip=","serveripv6="]` to make both IPs unassigned.
Not the most elegant solution, but it works.