Initial api.md

Closes #349.

Starts addressing #397.