Document API

this may be an open-source project, but anyone wishing to create their own client or server implementation, or contribute to an existing one, is going to have to do a lot of reverse engineering. Please publish your API docs!