How to connect a website to a LibreOffice writer through an API call(please help!)

Hi,

I’m looking for a way to connect my website to LibreOffice writer through an API call to perform mail merge operation. Is there anyone know how to do it?