use API method for setting id