Use the REST API to manage outside collaborators.
Note
Most endpoints use Authorization: Bearer <YOUR-TOKEN> and Accept: application/vnd.github+json headers, plus X-GitHub-Api-Version: 2026-03-10. Curl examples below omit these standard headers for brevity.
GET /orgs/{org}/outside_collaborators
List all users who are outside collaborators of an organization.
accept (string)application/vnd.github+json is recommended.org (string) (required)
The organization name. The name is not case sensitive.
filter (string)
Filter the list of outside collaborators. 2fa_disabled means that only outside collaborators without two-factor authentication enabled will be returned. 2fa_insecure means that only outside collaborators with insecure 2FA methods will be returned.
Default: all
Can be one of: 2fa_disabled, 2fa_insecure, all
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
Request:
curl -L \
-X GET \
https://api.github.com/orgs/ORG/outside_collaborators
Response schema (Status: 200):
Array of Simple User:
name: string or nullemail: string or nulllogin: required, stringid: required, integer, format: int64node_id: required, stringavatar_url: required, string, format: urigravatar_id: required, string or nullurl: required, string, format: urihtml_url: required, string, format: urifollowers_url: required, string, format: urifollowing_url: required, stringgists_url: required, stringstarred_url: required, stringsubscriptions_url: required, string, format: uriorganizations_url: required, string, format: urirepos_url: required, string, format: urievents_url: required, stringreceived_events_url: required, string, format: uritype: required, stringsite_admin: required, booleanstarred_at: stringuser_view_type: stringPUT /orgs/{org}/outside_collaborators/{username}
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". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "Enforcing repository management policies in your enterprise."
accept (string)application/vnd.github+json is recommended.org (string) (required)
The organization name. The name is not case sensitive.
username (string) (required)
The handle for the GitHub user account.
async (boolean)false202 - User is getting converted asynchronously
204 - User was converted
403 - Forbidden if user is the last owner of the organization, not a member of the organization, or if the enterprise enforces a policy for inviting outside collaborators. For more information, see "Enforcing repository management policies in your enterprise."
404 - Resource not found
Request:
curl -L \
-X PUT \
https://api.github.com/orgs/ORG/outside_collaborators/USERNAME \
-d '{
"async": true
}'
Response schema (Status: 202):
Request:
curl -L \
-X PUT \
https://api.github.com/orgs/ORG/outside_collaborators/USERNAME
Response schema (Status: 204):
DELETE /orgs/{org}/outside_collaborators/{username}
Removing a user from this list will remove them from all the organization's repositories.
accept (string)application/vnd.github+json is recommended.org (string) (required)
The organization name. The name is not case sensitive.
username (string) (required)
The handle for the GitHub user account.
204 - No Content
422 - Unprocessable Entity if user is a member of the organization
Request:
curl -L \
-X DELETE \
https://api.github.com/orgs/ORG/outside_collaborators/USERNAME
Response schema (Status: 204):