Added input checking to api endpoints