Syntax error fixes for API

Check syntax and made fixes.