API doc writing