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

GitHub API Docs


Revision #1
Created 16 January 2023 22:14:24 by Chase
Updated 16 January 2023 22:19:37 by Chase