Hello,
these may be useful too:
https://www.theforeman.org/contribute.html
https://www.theforeman.org/handbook.html
Custom IPAM provider - someone did the same thing for different IPAM, sadly not much info was shared
note that you’ll likely need a plugin on smart proxy side, which will talk to phpIPAM instance. The foreman plugin should probably just add new IPAM type, which is quite easy
List of Smart-Proxy Plugins - Foreman - you can take a look at proxy dhcp plugin if you want to go further than just to determine the free IP
let us know how it goes
Hope this helps