Sample - GitHub REST API
GET/orgs/{org}/invitations

List pending organization invitations

The return hash contains a role field which refers to the Organization Invitation role and will be one of the following values: direct_member, admin, billing_manager, or hiring_manager. If the invitee is not a GitHub member, the login field in the return hash will be null.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

5 parameters
orgstringrequired
The organization name. The name is not case sensitive.
per_pageintegeroptional
The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
Default:30
pageintegeroptional
The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)."
Default:1
rolestringoptional
Filter invitations by their member role.
Allowed:alladmindirect_memberbilling_managerhiring_managerDefault:all
invitation_sourcestringoptional
Filter invitations by their invitation source.
Allowed:allmemberscimDefault:all

2 status codes
200Response
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

Error handling

A 404 is returned: Resource not found.