update API for hook creation on the server-side