update api to register