How to implement API into c#

The web API is just a matter of making an HTTP request and parsing the JSON reply. There are frameworks that will let you do that easily like Json.NET and Jil.

Whenever you get a PING from the chat servers, send a PONG back.