Skip to main content
The REST API is now versioned. For more information, see "About API versioning."

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:

The fine-grained token must have the following permission set:

  • "Members" organization permissions (read)

Parameters for "List failed organization invitations"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
org string Required

The organization name. The name is not case sensitive.

Query parameters
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: 30

page integer

The page number of the results to fetch. For more information, see "Using pagination in the REST API."

Default: 1

HTTP response status codes for "List failed organization invitations"

Status codeDescription
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

get/orgs/{org}/failed_invitations
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_invitations

Response