add_widget API call sample