add table of contents to api.md

thanks rom1504