Mass Invite
The mass invite feature sends GitHub organization invitations to a list of usernames in a single request.
How It Works
- The server resolves each username via
octokit.rest.users.getByUsername({ username })— a REST call using the installation token (not the user’s OAuth token). - For each resolved user ID, it calls
octokit.rest.orgs.createInvitation({ org, invitee_id: user.data.id, role: 'direct_member' }). - All invitations are sent concurrently via
Promise.allSettled(uniqueLogins.map(...))— there is no batching or rate limiting.
Request Format
POST /api/[org]/organization/mass-invite
{
"logins": ["username1", "username2", "username3"]
}Response Format
{
"success": ["username1", "username3"],
"failed": [{ "login": "username2", "error": "Not Found" }]
}The key is success (not succeeded).
Limits and Behavior
| Property | Detail |
|---|---|
| Max users per request | 50 (returns 413 if exceeded) |
| Deduplication | new Set(normalizedLogins) — case-sensitive |
| Concurrency | All users simultaneously, no batching |
| Execution | Fully synchronous — returns results immediately |
| Auth requirement | Active session + org admin + GitHub App installed on org |
Admin Check Caveat
The org admin check is snapshotted at sign-in time. If a user was recently granted admin access on GitHub, they must sign out and sign back in before the invite endpoint will accept their requests.
Prerequisites
Before using mass invite:
- The GitHub App must be installed on the target organization
- You must be signed in with an account that has org admin permissions
- The target organization must be the same org the App is installed on
Team Management
Coming Soon. The team management UI is present but has no backend implementation. useBulkTeamMembersMutation is a stub and is never imported.
Role Management
Coming Soon. The role management UI is present but useBulkRoleMutation throws an error when called. No backend implementation exists.
Last updated on