Calling MC.api(); allows you to make a request to any of the API methods which your application has been granted.

The JavaScript API is very simple to use and does not require you to create a signature to send along with the request, all you need to do is specify the method you want to request along with any parameters for that method, and lastly specify a call back function to handle the response of the method.

The API function is made up of two parameters, the first being the data object where you specify the method and any parameters to send, and the second is the call back function you want to trigger.