Set the new key generated as the ApiKey obkect key value while returning it