v56

latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-011,4581,08113.3 MB
orgs

Create 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 is not available for Enterprise Managed User (EMU) organizations.

This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. See "Secondary rate limits" and "Dealing with secondary rate limits" for details.

post/orgs/{org}/invitations

Path parameters

orgstring required

The organization name. The name is not case sensitive.

Request body

invitee_idinteger

Required unless you provide email. GitHub user ID for the person you are inviting.

emailstring

Required unless you provide invitee_id. Email address of the person you are inviting, which can be an existing GitHub user.

role'admin' | 'direct_member' | 'billing_manager' | 'reinstate'

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_idsinteger[]

Specify IDs for the teams you want to invite new members to.

Response

Response

idinteger required
loginstring nullable required
emailstring nullable required
rolestring required
created_atstring required
failed_atstring nullable
failed_reasonstring nullable
team_countinteger required
node_idstring required
invitation_teams_urlstring required
invitation_sourcestring

Example response

{
  "inviter": {
    "login": "octocat",
    "id": 1,
    "node_id": "MDQ6VXNlcjE=",
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "gravatar_id": "41d064eb2195891e12d0413f63227ea7",
    "url": "https://api.github.com/users/octocat",
    "html_url": "https://github.com/octocat",
    "followers_url": "https://api.github.com/users/octocat/followers",
    "following_url": "https://api.github.com/users/octocat/following{/other_user}",
    "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
    "organizations_url": "https://api.github.com/users/octocat/orgs",
    "repos_url": "https://api.github.com/users/octocat/repos",
    "events_url": "https://api.github.com/users/octocat/events{/privacy}",
    "received_events_url": "https://api.github.com/users/octocat/received_events",
    "type": "User",
    "starred_at": "\"2020-07-09T00:17:55Z\"",
    "user_view_type": "public"
  },
  "node_id": "\"MDIyOk9yZ2FuaXphdGlvbkludml0YXRpb24x\"",
  "invitation_teams_url": "\"https://api.github.com/organizations/16/invitations/1/teams\"",
  "invitation_source": "\"member\""
}