For almost any API question, check out:

http://www.vbapi.com

For your particular question, see this part of their site:

http://www.vbapi.com/ref/s/sendmessage.html

Hope that helps!!

~seaweed