Refactored update keys from api.