I am attempting to use the following endpoint https://developer.github.com/v3/teams/members/#add-or-update-team-membership in order to add members to a team. I notice that this requires a GitHub username, and gives me an error if I try this request using an email.
If you are going through the GitHub UI, you are able to invite someone to a team using just their email. Is this something that is not exposed in the API? Is there a way around this? Essentially, I want to send the invite directly to their email, and not assume they have a GitHub account already set up.