Managing Mautic with Composer

I have been trying to install a Mautic API library for the last week, which apparently can only be done with Composer.

I’m completely stuck with Composer.

What version of composer.json should I put in my Mautic directory and what dependencies do I have to install (and how) to make Composer work?