Correctly annotate the Api type for JSON