Fixing typeerror on api creation
Merge pull request #1 from Krylik/ApiTypeerrorFix

Fixing typeerror on api creation