invitation api fixed