REST API endpoints for organization members
Use the REST API to manage memberships in your organization.
Note
If you use Enterprise Managed Users, you add members to organizations directly, rather than sending invitations. The operations for managing organization invitations will not work in your enterprise. However, the operations for viewing or managing membership directly will work as expected.
List failed organization invitations
The return hash contains failed_at and failed_reason fields which
represent the time at which the invitation failed and the reason for the failure.
This endpoint is not available for Enterprise Managed User (EMU) organizations.
Fine-grained access tokens for "List failed organization invitations"
This endpoint works with the following fine-grained token types:
- GitHub App user access tokens
- GitHub App installation access tokens
- Fine-grained personal access tokens
The fine-grained token must have the following permission set:
- "Members" organization permissions (read)
Parameters for "List failed organization invitations"
| Name, Type, Description |
|---|
accept string Setting to |
| Name, Type, Description |
|---|
org string RequiredThe organization name. The name is not case sensitive. |
| Name, Type, Description |
|---|
per_page integer The number of results per page (max 100). For more information, see "Using pagination in the REST API." Default: |
page integer The page number of the results to fetch. For more information, see "Using pagination in the REST API." Default: |
HTTP response status codes for "List failed organization invitations"
| Status code | Description |
|---|---|
200 | OK |
404 | Resource not found |
Code samples for "List failed organization invitations"
If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.
Request example
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/orgs/ORG/failed_invitationsResponse