Add validations to API