Skip to content

Instantly share code, notes, and snippets.

@mkol5222
Forked from amenocal/gh-copilot-api-calls.md
Created August 29, 2025 10:28
Show Gist options
  • Save mkol5222/9230a54c60a18e5a9948d222544059cc to your computer and use it in GitHub Desktop.
Save mkol5222/9230a54c60a18e5a9948d222544059cc to your computer and use it in GitHub Desktop.
gh copilot api

Copilot API Calls Example

Telemetry

export ORG=<YOUR-ORG>
  • Get Business seat information and settings for an org
gh api /orgs/$ORG/copilot/billing
  • List Copilot Business seat assignment for an org
gh api /orgs/$ORG/copilot/billing/seats
  • Get Copilot Business seat assignment for users
gh api /orgs/$ORG/members/<username>/copilot

TroubleShooting

  • Access Copilot
curl --verbose https://copilot-proxy.githubusercontent.com/_ping
  • Access with Proxy
curl --verbose -x http://YOUR-PROXY-URL:PORT -i -L https://copilot-proxy.githubusercontent.com/_ping
  • Access with Proxy and Certificate Issues
curl --verbose -x http://YOUR-PROXY-URL:PORT -i -L https://copilot-proxy.githubusercontent.com/_ping --insecure

User Management

  • Remove a user from Copilot
gh api /orgs/$ORG/copilot/billing/selected_users --method DELETE -f "selected_usernames[]=<username>"
  • Add a user to Copilot Business
gh api /orgs/$ORG/copilot/billing/selected_users --method POST -f "selected_usernames[]=<username>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment