invite API functions