Create an organization invitation

POST {{baseUrl}}/orgs/:org/invitations

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 abuse rate limiting. See [Abuse rate limits](https://developer.github.com/v3/#abuse-rate-limits) and [Dealing with abuse rate limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits) for details.

Request Body

{"invitee_id"=>"<integer>", "email"=>"<string>", "role"=>"direct_member", "team_ids"=>["<integer>", "<integer>"]}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring

RESPONSES

status: Created

{&quot;id&quot;:1,&quot;login&quot;:&quot;monalisa&quot;,&quot;email&quot;:&quot;octocat@github.com&quot;,&quot;role&quot;:&quot;direct_member&quot;,&quot;created_at&quot;:&quot;2016-11-30T06:46:10-08:00&quot;,&quot;inviter&quot;:{&quot;login&quot;:&quot;other_user&quot;,&quot;id&quot;:1,&quot;node_id&quot;:&quot;MDQ6VXNlcjE=&quot;,&quot;avatar_url&quot;:&quot;https://github.com/images/error/other_user_happy.gif&quot;,&quot;gravatar_id&quot;:&quot;&quot;,&quot;url&quot;:&quot;https://api.github.com/users/other_user&quot;,&quot;html_url&quot;:&quot;https://github.com/other_user&quot;,&quot;followers_url&quot;:&quot;https://api.github.com/users/other_user/followers&quot;,&quot;following_url&quot;:&quot;https://api.github.com/users/other_user/following{/other_user}&quot;,&quot;gists_url&quot;:&quot;https://api.github.com/users/other_user/gists{/gist_id}&quot;,&quot;starred_url&quot;:&quot;https://api.github.com/users/other_user/starred{/owner}{/repo}&quot;,&quot;subscriptions_url&quot;:&quot;https://api.github.com/users/other_user/subscriptions&quot;,&quot;organizations_url&quot;:&quot;https://api.github.com/users/other_user/orgs&quot;,&quot;repos_url&quot;:&quot;https://api.github.com/users/other_user/repos&quot;,&quot;events_url&quot;:&quot;https://api.github.com/users/other_user/events{/privacy}&quot;,&quot;received_events_url&quot;:&quot;https://api.github.com/users/other_user/received_events&quot;,&quot;type&quot;:&quot;User&quot;,&quot;site_admin&quot;:false},&quot;team_count&quot;:2,&quot;invitation_team_url&quot;:&quot;https://api.github.com/organizations/2/invitations/1/teams&quot;}