Mautic theme with webservice calls?

Hi,
Is it possible in a Mautic Theme under development to insert PHP code to make a web service call to return HTML code updated in real time?

Thanks