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
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: Created
{"id":1,"login":"monalisa","email":"octocat@github.com","role":"direct_member","created_at":"2016-11-30T06:46:10-08:00","inviter":{"login":"other_user","id":1,"node_id":"MDQ6VXNlcjE=","avatar_url":"https://github.com/images/error/other_user_happy.gif","gravatar_id":"","url":"https://api.github.com/users/other_user","html_url":"https://github.com/other_user","followers_url":"https://api.github.com/users/other_user/followers","following_url":"https://api.github.com/users/other_user/following{/other_user}","gists_url":"https://api.github.com/users/other_user/gists{/gist_id}","starred_url":"https://api.github.com/users/other_user/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/other_user/subscriptions","organizations_url":"https://api.github.com/users/other_user/orgs","repos_url":"https://api.github.com/users/other_user/repos","events_url":"https://api.github.com/users/other_user/events{/privacy}","received_events_url":"https://api.github.com/users/other_user/received_events","type":"User","site_admin":false},"team_count":2,"invitation_team_url":"https://api.github.com/organizations/2/invitations/1/teams"}