There are several types of messages exchanged to and from Agent Desk. These messages are sent once a Socket event, onCIMA message consists of the three parts: unique identifier of the message (ID), header and body.
Header and Body
The generic structure of header and body of the message is described here in CIM Messages.
The body of the message changes depending upon the type of message being exchanged. The types of messages are also described here in CIM Messages