There is no documented API.
Assuming you have a (test) 3cx PBX you have admin access to... The PBX web UI loads all the data by JSON.
Open up your browser's Dev Tools, and start Network recording. Then login and you'll see how the web page does the login, and you'll see the JSON queries it makes. You can reproduce that in PHP code.
edit: Typo