Remove an organization member
Removing a user from this list will remove them from all teams and they will no longer have any access to the organization’s repositories.
Path Parameters
Response
Response
Response
Path Parameters
Get organization membership for a user
In order to get a user’s membership with an organization, the authenticated user must be an organization member. The state
parameter in the response can be used to identify the user’s membership status.
Path Parameters
Response
application/json
Response
Response
Org Membership
Org Membership
Example:https://api.github.com/orgs/octocat/memberships/defunkt
The state of the member in the organization. The pending
state indicates the user has not yet accepted an invitation.
Allowed values:activepending
Example:active
The user’s membership type in the organization.
Allowed values:adminmemberbilling_manager
Example:admin
Example:https://api.github.com/orgs/octocat
Organization Simple
Show Child Parameters
Simple User
Show Child Parameters
Show Child Parameters
Path Parameters
Set organization membership for a user
Only authenticated organization owners can add a member to the organization or update the member’s role.
-
If the authenticated user is adding a member to the organization, the invited user will receive an email inviting them to the organization. The user’s membership status will be
pending
until they accept the invitation. -
Authenticated users can update a user’s membership by passing the
role
parameter. If the authenticated user changes a member’s role toadmin
, the affected user will receive an email notifying them that they’ve been made an organization owner. If the authenticated user changes an owner’s role tomember
, no email will be sent.
Rate limits
To prevent abuse, the authenticated user is limited to 50 organization invitations per 24 hour period. If the organization is more than one month old or on a paid plan, the limit is 500 invitations per 24 hour period.
Path Parameters
Body
application/json
Body
The role to give the user in the organization. Can be one of:
* admin
- The user will become an owner of the organization.
* member
- The user will become a non-owner member of the organization.
Allowed values:adminmember
Default:member
Response
application/json
Response
Response
Org Membership
Org Membership
Example:https://api.github.com/orgs/octocat/memberships/defunkt
The state of the member in the organization. The pending
state indicates the user has not yet accepted an invitation.
Allowed values:activepending
Example:active
The user’s membership type in the organization.
Allowed values:adminmemberbilling_manager
Example:admin
Example:https://api.github.com/orgs/octocat
Organization Simple
Show Child Parameters
Simple User
Show Child Parameters
Show Child Parameters
Path Parameters
Body
Remove organization membership for a user
In order to remove a user’s membership with an organization, the authenticated user must be an organization owner.
If the specified user is an active member of the organization, this will remove them from the organization. If the specified user has been invited to the organization, this will cancel their invitation. The specified user will receive an email notification in both cases.
Path Parameters
Response
Response
Response
Path Parameters
List outside collaborators for an organization
List all users who are outside collaborators of an organization.
Query Parameters
Filter the list of outside collaborators. Can be one of:
* 2fa_disabled
: Outside collaborators without two-factor authentication enabled.
* all
: All outside collaborators.
Allowed values:2fa_disabledall
Default:all
Results per page (max 100)
Default:30
Page number of the results to fetch.
Default:1
Path Parameters
Response
200 application/json
Response
Response
Simple User
Example:octocat
Example:1
Example:MDQ6VXNlcjE=
Example:https://github.com/images/error/octocat_happy.gif
Example:41d064eb2195891e12d0413f63227ea7
Example:https://api.github.com/users/octocat
Example:https://github.com/octocat
Example:https://api.github.com/users/octocat/followers
Example:https://api.github.com/users/octocat/following{/other_user}
Example:https://api.github.com/users/octocat/gists{/gist_id}
Example:https://api.github.com/users/octocat/starred{/owner}{/repo}
Example:https://api.github.com/users/octocat/subscriptions
Example:https://api.github.com/users/octocat/orgs
Example:https://api.github.com/users/octocat/repos
Example:https://api.github.com/users/octocat/events{/privacy}
Example:https://api.github.com/users/octocat/received_events
Example:User
Example:"2020-07-09T00:17:55Z"