Common API mistakes and how to avoid them