[API] Fixed incorrect example code in documentation