GitHub v3 REST API

Convert an organization member to outside collaborator

When an organization member is converted to an outside collaborator, they’ll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see “Converting an organization member to an outside collaborator”.

put
{protocol}://{hostname}/api/v3/orgs/{org}/outside_collaborators/{username}

Path Parameters

orgstringrequired
usernamestringrequired

Response

application/json

User is getting converted asynchronously

object
* Additional properties are NOT allowed.
put/orgs/{org}/outside_collaborators/{username}
 
application/json

Remove outside collaborator from an organization

Removing a user from this list will remove them from all the organization’s repositories.

delete
{protocol}://{hostname}/api/v3/orgs/{org}/outside_collaborators/{username}

Path Parameters

orgstringrequired
usernamestringrequired

Response

Response

delete/orgs/{org}/outside_collaborators/{username}
 

List public organization members

Members of an organization can choose to have their membership publicized or not.

get
{protocol}://{hostname}/api/v3/orgs/{org}/public_members

Query Parameters

per_pageinteger

Results per page (max 100)

Default:30

pageinteger

Page number of the results to fetch.

Default:1

Path Parameters

orgstringrequired

Response

200 application/json

Response

Simple User

namestring | null
emailstring | null
loginstringrequired

Example:octocat

idintegerrequired

Example:1

node_idstringrequired

Example:MDQ6VXNlcjE=

avatar_urlstring(uri)required

Example:https://github.com/images/error/octocat_happy.gif

gravatar_idstring | nullrequired

Example:41d064eb2195891e12d0413f63227ea7

urlstring(uri)required

Example:https://api.github.com/users/octocat

html_urlstring(uri)required

Example:https://github.com/octocat

followers_urlstring(uri)required

Example:https://api.github.com/users/octocat/followers

following_urlstringrequired

Example:https://api.github.com/users/octocat/following{/other_user}

gists_urlstringrequired

Example:https://api.github.com/users/octocat/gists{/gist_id}

starred_urlstringrequired

Example:https://api.github.com/users/octocat/starred{/owner}{/repo}

subscriptions_urlstring(uri)required

Example:https://api.github.com/users/octocat/subscriptions

organizations_urlstring(uri)required

Example:https://api.github.com/users/octocat/orgs

repos_urlstring(uri)required

Example:https://api.github.com/users/octocat/repos

events_urlstringrequired

Example:https://api.github.com/users/octocat/events{/privacy}

received_events_urlstring(uri)required

Example:https://api.github.com/users/octocat/received_events

typestringrequired

Example:User

site_adminbooleanrequired
starred_atstring

Example:"2020-07-09T00:17:55Z"

get/orgs/{org}/public_members
 
200 application/json

Check public organization membership for a user

get
{protocol}://{hostname}/api/v3/orgs/{org}/public_members/{username}

Path Parameters

orgstringrequired
usernamestringrequired

Response

Response if user is a public member

get/orgs/{org}/public_members/{username}
 

Set public organization membership for the authenticated user

The user can publicize their own membership. (A user cannot publicize the membership for another user.)

Note that you’ll need to set Content-Length to zero when calling out to this endpoint. For more information, see “HTTP verbs.”

put
{protocol}://{hostname}/api/v3/orgs/{org}/public_members/{username}

Path Parameters

orgstringrequired
usernamestringrequired

Response

Response

put/orgs/{org}/public_members/{username}