moved sendInvites as http method