Text of docs.github.com › en › rest › orgs › members as Styx crawled it on Nov 19, 2026. The page may have changed since. Only its words are kept, without pictures or layout, and only the first part of a long page.

Open the live page

REST API endpoints for organization members - GitHub Docs

Skip to main content Skip to content Collapse sidebar Expand sidebar 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. 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.

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" 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 code Description 200 OK 404 Resource not found Code samples for "List failed organization invitations" Request example get /orgs /{org} /failed_ invitations Copy to clipboard curl 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_invitations Response Status: 200 [ { "id": 1, "login": "monalisa", "node_id": "MDQ6VXNlcjE=", "email": "octocat@github.com", "role": "direct_member", "created_at": "2016-11-30T06:46:10-08:00", "failed_at": "", "failed_reason": "", "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_teams_url": "https://api.github.com/organizations/2/invitations/1/teams", "invitation_source": "member" } ] 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 . Fine-grained access tokens for "List pending 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 pending 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 role string Filter invitations by their member role.

Default : all Can be one of : all , admin , direct_member , billing_manager , hiring_manager invitation_source string Filter invitations by their invitation source. Default : all Can be one of : all , member , scim HTTP response status codes for "List pending organization invitations" Status code Description 200 OK 404 Resource not found Code samples for "List pending organization invitations" Request example get /orgs/{org}/invitations Copy to clipboard curl 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/invitations Response Status: 200 [ { "id": 1, "login": "monalisa", "node_id": "MDQ6VXNlcjE=", "email": "octocat@github.com", "role": "direct_member", "created_at": "2016-11-30T06:46:10-08:00", "failed_at": "", "failed_reason": "", "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_teams_url": "https://api.github.com/organizations/2/invitations/1/teams", "invitation_source": "member" } ] Create an organization invitation 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 secondary rate limiting. For more information, see " Rate limits for the API " and " Best practices for using the REST API ." Fine-grained access tokens for "Create an organization invitation" 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 (write) Parameters for "Create an organization invitation" 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. Body parameters Name, Type, Description invitee_id integer Required unless you provide email . GitHub user ID for the person you are inviting. email string Required unless you provide invitee_id . Email address of the person you are inviting, which can be an existing GitHub user. role string The role for the new member. admin - Organization owners with full administrative rights to the organization and complete access to all repositories and teams. direct_member - Non-owner organization members with ability to

The rest of this page is on the live site.