Changed it so add memory api call returns the new memory key