Write api documentation

Signed-off-by: Ramnique Singh <mail@ramniquesingh.name>