API fix for invitations