more work on invitations endpoint