change api input type to object