API endpoints now working with JSON input on all requests