Not sure if this is right place to ask question, but I didn't find better place.
I am looking for matomo API to register a new website. Something like a POST api which accepts hostname and other info as payload and return "JS tracking code" or website ID.
The place to ask questions about Matomo is the forum: https://forum.matomo.org/
Yes, there are multiple APIs that allow to do exactly what you want: https://developer.matomo.org/api-reference/reporting-api#SitesManager