Refactored API to use customer api keys