GitHub API: Organization Membership
This simple curl command will set your membership to public/private for any organization.
A use case would be an organization so big you can't search for yourself.
For this to work, you need a GitHub Personal Access Token.
# To make an org private, replace PUT with DELETE curl \ -X PUT \ -H "Accept: application/vnd.github+json" \ -H "Authorization: token xxxxxxxxxxxxxxxx" \ https://api.github.com/orgs/YourOrgUsernameHere/public_members/YourGitHubUsernameHere