setup api to add to database