api: add new api to register insert/remove callback