POST
/orgs/{org}/invitationsCreate an organization invitation
Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "Rate limits for the API" and "Best practices for using the REST API."
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
orgstringrequired
The organization name. The name is not case sensitive.
invitee_idintegeroptional
**Required unless you provide `email`**. GitHub user ID for the person you are inviting.
emailstringoptional
**Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user.
rolestringoptional
The role for the new member.
* `admin` - Organization owners with full administrative rights to the organization and complete access to all repositories and teams.
* `direct_member` - Non-owner organization members with ability to see other members and join teams by invitation.
* `billing_manager` - Non-owner organization members with ability to manage the billing settings of your organization.
* `reinstate` - The previous role assigned to the invitee before they were removed from your organization. Can be one of the roles listed above. Only works if the invitee was previously part of your organization.
team_idsarray<integer>optional
Specify IDs for the teams you want to invite new members to.
201Response
idintegerrequired
loginstringrequired
emailstringrequired
rolestringrequired
created_atstringrequired
failed_atstringoptional
failed_reasonstringoptional
inviterobjectrequired
A GitHub user.
team_countintegerrequired
node_idstringrequired
invitation_teams_urlstringrequired
invitation_sourcestringoptional
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
422Validation failed, or the endpoint has been spammed.
messagestringrequired
documentation_urlstringrequired
errorsarray<object>optional
Error handling
A 404 is returned: Resource not found. A 422 is returned: Validation failed, or the endpoint has been spammed.