Update for new API for custom endpoints and api keys

Current codebase does not allow for custom endpoints nor api keys.