Updated setter of api_key