Call Piwik API using AJAX

Does Piwik supports API calls using AJAX? For example I can add site using the SitesManager.addSite API? I tried using jquery AJAX and its creating the site but the response I am getting is error.

Thanks,
Jubin

Yes it works, in fact we provide JSONP API for this (see &format= parameter in http://piwik.org/docs/analytics-api/reference/ )