API Create tracking code

Could someone direct me to documentation on how to create tracking codes via API call? Numerous searches have not yielded desired results.

e.g. Manner to issue via PHP (preferably) an API call via PHP CLI or CURL that would create a new account. This would bypass direct user intervention.

I found a PHP function to issue the tracking command. I would prefer to avoid integration of Javascript for this specific task as all of our servers are able to communicate on an internal network.As well I would prefer to reduce the front end overhead of handling another HTTP request on two servers (i.e. out of one into the other).

Background:
Currently we are hosting over 50 sites and growing daily. We are looking to automate several tasks in setting up new accounts / sites, including tracking codes. Initially this is for internal use and futuristically allowing the site owners access, most of which will not even look at it.

To create tracking code via API, use the SitesManager.getJavascriptTag` API method: Reporting API Reference: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3

Don’t call this on every page, but ideally you would cache it locally, as the JS code will not change and will always be backward compatible.