Convert 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 /orgs/:org/outside_collaborators/:username

Response

Status: 204 No Content

Response if user is the last owner of the organization

Status: 403 Forbidden
{
  "message": "Cannot convert the last owner to an outside collaborator",
  "documentation_url": "https://developer.github.com/enterprise/2.20/v3/orgs/outside_collaborators/#convert-member-to-outside-collaborator"
}

Response if user is not a member of the organization

Status: 403 Forbidden
{
  "message": "<user> is not a member of the <organization> organization.",
  "documentation_url": "https://developer.github.com/enterprise/2.20/v3/orgs/outside_collaborators/#convert-member-to-outside-collaborator"
}