api for register is update.