...
Access to the API is over a socketa socket.io 1io 1.0.x connection to the PBX. To connect to the server via Javascript:
...
Responses to requests are emitted by the server as socket.io 'response' events. The argument to the event is a JSON RPC 2.0 response object. Notifications, resulting from 'subscribe' requests, are emitted as 'notification' events. The argument is similar to a response object, but omits the 'id' field per the spec.
...