GitHub Orgs API

The Orgs API from GitHub — 30 operation(s) for orgs.

Operations 49

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /organizations List every organization on the server · GitHub List Organizations #
Ask an LLM
“Can I get a list of all organizations on our GitHub Enterprise Server in the order they were created?”
“How do I page through every organization on the instance using an organization ID cursor?”
Tell an agent
List all organizations on the server, oldest first.
List the organizations created after organization ID {since}.
GET /organizations/{organization_id}/custom_roles List custom repository roles (deprecated, by org ID) · GitHub Deprecated - List Custom Repository Roles in an Organization #
Ask an LLM
“Is there an older endpoint that lists an organization's custom repository roles by numeric organization ID?”
“What custom repository roles exist for an organization when I only know its numeric ID?”
Tell an agent
Use the deprecated endpoint to list custom repository roles for organization ID {organization_id}.
Look up the custom roles for numeric organization {organization_id} via the legacy roles endpoint.
GET /orgs/{org} Get an organization's profile and settings · GitHub Get an Organization #
Ask an LLM
“What details can I pull about a GitHub organization, like its plan, billing email and settings?”
“Does this organization require two-factor authentication for its members?”
Tell an agent
Show me the profile and settings for organization {org}.
Check whether {org} requires two-factor authentication.
PATCH /orgs/{org} Update an organization's profile and settings · GitHub Update an Organization #
Ask an LLM
“How do I change the billing email or public profile details of an organization?”
“Can I stop members from creating public repositories in my organization?”
Tell an agent
Change the billing email for organization {org} to {billing_email}.
Set the default repository permission for members of {org} to {default_repository_permission}.
DELETE /orgs/{org} Delete an organization and all its repositories · GitHub Delete an Organization #
Ask an LLM
“What happens to the repositories when I delete a whole organization?”
“Can the organization's login name be reused right after the organization is deleted?”
Tell an agent destructive · confirm first
Delete the organization {org} along with all of its repositories.
Permanently remove organization {org}.
GET /orgs/{org}/announcement Get an organization's announcement banner · GitHub Get Announcement Banner for Organization #
Ask an LLM
“What announcement banner is currently showing to members of our organization?”
“When does the organization's current announcement banner expire?”
Tell an agent
Show me the announcement banner set for {org}.
Read the current org-wide announcement message for {org}.
PATCH /orgs/{org}/announcement Set an organization's announcement banner · GitHub Set Announcement Banner for Organization #
Ask an LLM
“Can I post a banner message that every member of my organization sees?”
“Is there a way to give an organization announcement an automatic expiry date?”
Tell an agent
Set the announcement banner for {org} to {announcement}.
Post the banner {announcement} to {org} and have it expire at {expires_at}.
DELETE /orgs/{org}/announcement Remove an organization's announcement banner · GitHub Remove Announcement Banner from Organization #
Ask an LLM
“How do I take down the announcement banner from our organization?”
“Can I clear an org announcement before it expires on its own?”
Tell an agent destructive · confirm first
Remove the announcement banner from {org}.
Clear the org-wide announcement for {org} now.
GET /orgs/{org}/audit-log Get an organization's audit log · GitHub Get the Audit Log for an Organization #
Ask an LLM
“Who changed what in our organization over the last few months?”
“Can I search the organization audit log for older events or only Git events?”
Tell an agent
Show me the audit log for {org}, newest events first.
Search the audit log of {org} for {phrase}.
GET /orgs/{org}/custom-repository-roles List an organization's custom repository roles · GitHub List Custom Repository Roles in an Organization #
Ask an LLM
“Which custom repository roles has my organization defined?”
“What custom roles can I assign to people on repositories in this org?”
Tell an agent
List the custom repository roles defined in {org}.
Show every custom repo role available in organization {org}.
POST /orgs/{org}/custom-repository-roles Create a custom repository role · GitHub Create a Custom Repository Role #
Ask an LLM
“Can I create a new repository role that builds on Write access but adds a few extra permissions?”
“How do I define a custom role for repositories in my organization?”
Tell an agent
Create a custom repository role named {name} in {org} based on {base_role} with permissions {permissions}.
Add a new repo role {name} to {org}, described as {description}, inheriting from {base_role} plus {permissions}.
GET /orgs/{org}/custom-repository-roles/{role_id} Get one custom repository role · GitHub Get a Custom Repository Role #
Ask an LLM
“Which permissions and base role does a specific custom repository role grant?”
“What exactly is in one of our organization's custom repo roles?”
Tell an agent
Show me custom repository role {role_id} in {org}.
Get the permissions granted by role {role_id} in organization {org}.
PATCH /orgs/{org}/custom-repository-roles/{role_id} Update a custom repository role · GitHub Update a Custom Repository Role #
Ask an LLM
“Can I add permissions to a custom repository role that already exists?”
“Is it possible to rename an existing custom repo role or change its base role?”
Tell an agent
Rename existing custom role {role_id} in {org} to {name}.
Change the permissions on existing role {role_id} in {org} to {permissions}.
DELETE /orgs/{org}/custom-repository-roles/{role_id} Delete a custom repository role · GitHub Delete a Custom Repository Role #
Ask an LLM
“Can I get rid of a custom repository role we no longer use?”
“What happens when I delete a custom repo role from the organization?”
Tell an agent destructive · confirm first
Delete custom repository role {role_id} from {org}.
Remove the custom repo role {role_id} in organization {org}.
GET /orgs/{org}/hooks List an organization's webhooks · GitHub List Organization Webhooks #
Ask an LLM
“Which webhooks are configured at the organization level?”
“What org webhooks are sending events out of our organization right now?”
Tell an agent
List all webhooks on organization {org}.
Show me the organization-level hooks for {org}.
POST /orgs/{org}/hooks Create an organization webhook · GitHub Create an Organization Webhook #
Ask an LLM
“How do I get notified at my own URL whenever something happens across my organization?”
“Can one org webhook subscribe to just a few event types?”
Tell an agent
Create a {name} webhook on {org} with configuration {config}.
Add a new webhook to {org} with config {config} that fires on {events}.
GET /orgs/{org}/hooks/{hook_id} Get an organization webhook · GitHub Get an Organization Webhook #
Ask an LLM
“Which events is a specific organization webhook subscribed to, and is it active?”
“Can I look at the details of one webhook on my org?”
Tell an agent
Show me webhook {hook_id} on {org}.
Get the events and active status of org hook {hook_id} in {org}.
PATCH /orgs/{org}/hooks/{hook_id} Update an organization webhook's events or status · GitHub Update an Organization Webhook #
Ask an LLM
“Can I pause an organization webhook without deleting it?”
“How do I change which events an existing org webhook listens for?”
Tell an agent
Deactivate org webhook {hook_id} in {org} by setting active to {active}.
Change existing hook {hook_id} on {org} to fire on {events}.
DELETE /orgs/{org}/hooks/{hook_id} Delete an organization webhook · GitHub Delete an Organization Webhook #
Ask an LLM
“How do I stop an organization webhook from sending events for good?”
“Can I delete an org-level webhook without touching the repository webhooks?”
Tell an agent destructive · confirm first
Delete webhook {hook_id} from {org}.
Remove the organization hook {hook_id} in {org} entirely.
GET /orgs/{org}/hooks/{hook_id}/config Get an organization webhook's delivery configuration · GitHub Get a Webhook Configuration for an Organization #
Ask an LLM
“What URL and content type is an org webhook delivering to?”
“Is SSL verification turned off on one of our organization webhooks?”
Tell an agent
Show the delivery URL and content type configured for hook {hook_id} on {org}.
Check the SSL setting in the config of org webhook {hook_id} for {org}.
PATCH /orgs/{org}/hooks/{hook_id}/config Update an organization webhook's URL, secret or SSL · GitHub Update a Webhook Configuration for an Organization #
Ask an LLM
“How do I point an existing org webhook at a new URL?”
“Can I rotate the secret on an organization webhook without recreating it?”
Tell an agent
Point org webhook {hook_id} in {org} at {url}.
Rotate the secret on org hook {hook_id} in {org} to {secret}.
GET /orgs/{org}/hooks/{hook_id}/deliveries List deliveries for an organization webhook · GitHub List Deliveries for an Organization Webhook #
Ask an LLM
“Did our organization webhook actually deliver its recent events?”
“Can I see only the redelivery attempts for an org webhook?”
Tell an agent
List recent deliveries for webhook {hook_id} on {org}.
Show only redelivered attempts for org hook {hook_id} in {org} with redelivery {redelivery}.
GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id} Get one delivery of an organization webhook · GitHub Get a Webhook Delivery for an Organization Webhook #
Ask an LLM
“What request and response were recorded for one specific org webhook delivery?”
“Why did a single organization webhook delivery fail?”
Tell an agent
Show delivery {delivery_id} for webhook {hook_id} on {org}.
Get the request and response details of org hook delivery {delivery_id} ({hook_id}, {org}).
POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts Redeliver an organization webhook delivery · GitHub Redeliver a Delivery for an Organization Webhook #
Ask an LLM
“Can I resend a webhook event that my server failed to receive from the org?”
“How do I retry one failed organization webhook delivery?”
Tell an agent
Redeliver delivery {delivery_id} of webhook {hook_id} on {org}.
Retry the failed org webhook delivery {delivery_id} for hook {hook_id} in {org}.
POST /orgs/{org}/hooks/{hook_id}/pings Ping an organization webhook · GitHub Ping an Organization Webhook #
Ask an LLM
“Is there a way to send a test ping to an organization webhook?”
“Can I check that my org webhook endpoint is reachable without waiting for a real event?”
Tell an agent
Send a ping event to webhook {hook_id} on {org}.
Test org hook {hook_id} in {org} with a ping.
GET /orgs/{org}/installations List GitHub App installations in an organization · GitHub List App Installations for an Organization #
Ask an LLM
“Which GitHub Apps are installed on our organization?”
“What apps have been granted access to our org account?”
Tell an agent
List the GitHub App installations for {org}.
Show every app installed on organization {org}.
GET /orgs/{org}/members List an organization's members · GitHub List Organization Members #
Ask an LLM
“Who are all the members of our organization, including concealed ones?”
“Which organization members still don't have two-factor authentication turned on?”
Tell an agent
List all members of {org}.
List members of {org} matching filter {filter}, such as those with 2FA disabled.
GET /orgs/{org}/members/{username} Check whether a user is an organization member · GitHub Check Organization Membership for a User #
Ask an LLM
“Is a particular user a member of my organization, public or concealed?”
“Can I confirm someone belongs to an org with a simple yes or no?”
Tell an agent
Check whether {username} is a member of {org}.
Confirm that user {username} belongs to organization {org}.
DELETE /orgs/{org}/members/{username} Remove a member from an organization · GitHub Remove an Organization Member #
Ask an LLM
“What happens to someone's team memberships and repository access when I kick them out of the organization?”
“Can I remove a person from the org entirely, not just from a team?”
Tell an agent destructive · confirm first
Remove {username} from organization {org}.
Kick member {username} out of {org} and revoke their access.
GET /orgs/{org}/memberships/{username} Get a user's membership role and state in an org · GitHub Get Organization Membership for a User #
Ask an LLM
“Is a user an admin or a regular member of our organization, and is their invitation still pending?”
“What role does a specific person hold in the org?”
Tell an agent
Get the membership role and state of {username} in {org}.
Tell me whether {username} is pending or active in {org} and what role they have.
PUT /orgs/{org}/memberships/{username} Invite a user or change their organization role · GitHub Set Organization Membership for a User #
Ask an LLM
“How do I invite someone to join my organization?”
“Can I promote an existing member to organization owner?”
Tell an agent
Invite {username} to join {org}.
Set the role of {username} in {org} to {role}.
DELETE /orgs/{org}/memberships/{username} Remove a user's membership or cancel their invitation · GitHub Remove Organization Membership for a User #
Ask an LLM
“Can I cancel a pending invitation someone hasn't accepted yet?”
“How do I revoke a user's organization membership record, invited or active?”
Tell an agent destructive · confirm first
Cancel the pending organization invitation for {username} in {org}.
Revoke the membership record of {username} in {org}.
GET /orgs/{org}/outside_collaborators List an organization's outside collaborators · GitHub List Outside Collaborators for an Organization #
Ask an LLM
“Who has access to our repositories without being an organization member?”
“Which outside collaborators have two-factor authentication disabled?”
Tell an agent
List the outside collaborators for {org}.
Show outside collaborators of {org} matching filter {filter}.
PUT /orgs/{org}/outside_collaborators/{username} Convert a member to an outside collaborator · GitHub Convert an Organization Member to Outside Collaborator #
Ask an LLM
“Can I downgrade a member to an outside collaborator so they keep only their current repository access?”
“Is it possible to run the member-to-collaborator conversion as a background job?”
Tell an agent
Convert {username} in {org} from a member to an outside collaborator.
Turn member {username} of {org} into an outside collaborator, running it async {async}.
DELETE /orgs/{org}/outside_collaborators/{username} Remove an outside collaborator from an organization · GitHub Remove Outside Collaborator from an Organization #
Ask an LLM
“How do I cut off an outside collaborator from every repository in the organization at once?”
“Can I remove a non-member contractor from all our org repos?”
Tell an agent destructive · confirm first
Remove outside collaborator {username} from all repositories in {org}.
Revoke contractor {username}'s outside-collaborator access to {org}.
GET /orgs/{org}/public_members List an organization's public members · GitHub List Public Organization Members #
Ask an LLM
“Which members have chosen to show their membership publicly on the org profile?”
“Who is publicly listed as belonging to this organization?”
Tell an agent
List the public members of {org}.
Show who publicly displays membership in {org}.
GET /orgs/{org}/public_members/{username} Check whether a user's org membership is public · GitHub Check Public Organization Membership for a User #
Ask an LLM
“Has a specific user made their membership in the organization public?”
“Does someone's profile publicly show that they belong to this org?”
Tell an agent
Check whether {username} publicly shows membership in {org}.
Confirm {username} is a public member of {org}.
PUT /orgs/{org}/public_members/{username} Make my organization membership public · GitHub Set Public Organization Membership for the Authenticated User #
Ask an LLM
“Can I show on my profile that I belong to an organization?”
“How do I publicize my own membership in an org?”
Tell an agent
Make my membership in {org} public for user {username}.
Publicize that {username} belongs to {org}.
DELETE /orgs/{org}/public_members/{username} Hide my organization membership · GitHub Remove Public Organization Membership for the Authenticated User #
Ask an LLM
“Can I conceal my membership in an organization so it no longer shows on my profile?”
“How do I make my own org membership private again?”
Tell an agent destructive · confirm first
Conceal my membership in {org} for user {username}.
Hide the fact that {username} is a member of {org}.
GET /orgs/{org}/repository-fine-grained-permissions List permissions available for custom repo roles · GitHub List Repository Fine-grained Permissions for an Organization #
Ask an LLM
“Which fine-grained permissions can I add to a custom repository role?”
“What individual permissions are available when building repo roles in my organization?”
Tell an agent
List the fine-grained repository permissions available in {org}.
Show which permissions {org} can use when defining custom repo roles.
GET /orgs/{org}/security-managers List an organization's security manager teams · GitHub List Security Manager Teams #
Ask an LLM
“Which teams have the security manager role in our organization?”
“Who can manage security alerts across every repository in the org?”
Tell an agent
List the security manager teams for {org}.
Show which teams hold the security manager role in {org}.
PUT /orgs/{org}/security-managers/teams/{team_slug} Grant a team the security manager role · GitHub Add a Security Manager Team #
Ask an LLM
“Can I give my security team access to manage alerts across all organization repositories?”
“How do I make a team a security manager for the org?”
Tell an agent
Make team {team_slug} a security manager in {org}.
Grant the security manager role to {team_slug} in organization {org}.
DELETE /orgs/{org}/security-managers/teams/{team_slug} Revoke a team's security manager role · GitHub Remove a Security Manager Team #
Ask an LLM
“How do I take the security manager role away from a team?”
“Can I stop a team from managing security alerts org-wide?”
Tell an agent destructive · confirm first
Remove team {team_slug} from the security managers of {org}.
Revoke security manager rights for {team_slug} in {org}.
POST /orgs/{org}/{security_product}/{enablement} Turn a security feature on or off for all org repos · GitHub Enable or Disable a Security Feature for an Organization #
Ask an LLM
“Can I enable a security feature like secret scanning on every repository in my organization at once?”
“Is there a bulk switch to disable a security feature across all org repositories?”
Tell an agent
Apply {enablement} for {security_product} across all repositories in {org}.
Turn {security_product} on or off org-wide in {org} using action {enablement}.
GET /user/memberships/orgs List my organization memberships · GitHub List Organization Memberships for the Authenticated User #
Ask an LLM
“Which organizations am I a member of, including invitations I haven't accepted?”
“Do I have any pending organization invitations waiting for me?”
Tell an agent
List all my organization memberships with their roles.
Show my organization memberships in state {state}.
GET /user/memberships/orgs/{org} Get my membership in one organization · GitHub Get an Organization Membership for the Authenticated User #
Ask an LLM
“What is my own role in a specific organization?”
“Is my invitation to a particular org still pending?”
Tell an agent
Show my own membership and role in {org}.
Check whether my membership in {org} is active or pending.
PATCH /user/memberships/orgs/{org} Accept a pending organization invitation · GitHub Update an Organization Membership for the Authenticated User #
Ask an LLM
“How do I accept an invitation to join an organization through the API?”
“Can I activate my pending membership in an org?”
Tell an agent
Accept my pending invitation to {org} by setting state to {state}.
Activate my membership in {org} with state {state}.
GET /user/orgs List the organizations I belong to · GitHub List Organizations for the Authenticated User #
Ask an LLM
“Which organizations does my own account belong to?”
“Can I get the orgs my token is allowed to see for my user?”
Tell an agent
List the organizations I belong to.
Show all orgs for my signed-in account.
GET /users/{username}/orgs List another user's public organizations · GitHub List Organizations for a User #
Ask an LLM
“What public organizations does a given GitHub user belong to?”
“Which orgs show up on someone else's profile?”
Tell an agent
List the public organizations for user {username}.
Show which orgs {username} publicly belongs to.

Documentation

📖
Documentation
https://docs.github.com/en/rest/apps
📖
Documentation
https://docs.github.com/en/rest/codes-of-conduct/codes-of-conduct
📖
Documentation
https://docs.github.com/en/rest/emojis
📖
Documentation
https://docs.github.com/en/rest/gitignore
📖
Documentation
https://docs.github.com/en/rest/apps/installations
📖
Documentation
https://docs.github.com/en/rest/enterprise-admin
📖
Documentation
https://docs.github.com/en/rest/activity/events
📖
Documentation
https://docs.github.com/en/rest/orgs
📖
Documentation
https://docs.github.com/en/rest/rate-limit
📖
Documentation
https://docs.github.com/en/enterprise-cloud@latest/rest/scim
📖
Documentation
https://docs.github.com/en/rest/using-the-rest-api/getting-started-with-the-rest-api
📖
Documentation
https://docs.github.com/en/rest/teams
📖
Documentation
https://docs.github.com/en/rest/meta/meta
📖
Documentation
https://docs.github.com/en/rest/actions
📖
Documentation
https://docs.github.com/en/rest/branches
📖
Documentation
https://docs.github.com/en/rest/code-scanning
📖
Documentation
https://docs.github.com/en/rest/collaborators
📖
Documentation
https://docs.github.com/en/rest/dependabot
📖
Documentation
https://docs.github.com/en/rest/webhooks
📖
Documentation
https://docs.github.com/en/rest/pulls
📖
Documentation
https://docs.github.com/en/rest/git/tags
📖
Documentation
https://docs.github.com/en/rest/repos/autolinks
📖
Documentation
https://docs.github.com/en/rest/collaborators/invitations

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/github-orgs-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

github-orgs-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 1.1.4
  title: GitHub v3 REST Orgs API
  description: GitHub's v3 REST API.
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
  termsOfService: https://docs.github.com/articles/github-terms-of-service
  contact:
    name: Support
    url: https://support.github.com/contact?tags=dotcom-rest-api
  x-github-plan: ghes
  x-github-release: 3.9
servers:
- url: '{protocol}://{hostname}/api/v3'
  variables:
    hostname:
      description: Self-hosted Enterprise Server hostname
      default: HOSTNAME
    protocol:
      description: Self-hosted Enterprise Server protocol
      default: http
tags:


# --- truncated at 32 KB (175 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/openapi/github-orgs-api-openapi.yml