Use the REST API to interact with organizations.
Note
Most endpoints use Authorization: Bearer <YOUR-TOKEN> and Accept: application/vnd.github+json headers, plus X-GitHub-Api-Version: 2026-03-10. Curl examples below omit these standard headers for brevity.
GET /organizations
Lists all organizations, in the order that they were created.
Note
Pagination is powered exclusively by the since parameter. Use the Link header to get the URL for the next page of organizations.
accept (string)application/vnd.github+json is recommended.since (integer)
An organization ID. Only return organizations with an ID greater than this ID.
per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
200 - OK
304 - Not modified
Request:
curl -L \
-X GET \
https://api.github.com/organizations
Response schema (Status: 200):
Array of Organization Simple:
login: required, stringid: required, integernode_id: required, stringurl: required, string, format: urirepos_url: required, string, format: urievents_url: required, string, format: urihooks_url: required, stringissues_url: required, stringmembers_url: required, stringpublic_members_url: required, stringavatar_url: required, stringdescription: required, string or nullGET /orgs/{org}
Gets information about an organization.
When the value of two_factor_requirement_enabled is true, the organization requires all members, billing managers, outside collaborators, guest collaborators, repository collaborators, or everyone with access to any repository within the organization to enable two-factor authentication.
To see the full details about an organization, the authenticated user must be an organization owner.
OAuth app tokens and personal access tokens (classic) need the admin:org scope to see the full details about an organization.
To see information about an organization's GitHub plan, GitHub Apps need the Organization plan permission.
accept (string)application/vnd.github+json is recommended.org (string) (required)200 - OK
404 - Resource not found
Request:
curl -L \
-X GET \
https://api.github.com/orgs/ORG
Response schema (Status: 200):
login: required, stringid: required, integernode_id: required, stringurl: required, string, format: urirepos_url: required, string, format: urievents_url: required, string, format: urihooks_url: required, stringissues_url: required, stringmembers_url: required, stringpublic_members_url: required, stringavatar_url: required, stringdescription: required, string or nullname: stringcompany: string or nullblog: string or null, format: urilocation: string or nullemail: string or null, format: emailtwitter_username: string or nullis_verified: booleanhas_organization_projects: required, booleanhas_repository_projects: required, booleanpublic_repos: required, integerpublic_gists: required, integerfollowers: required, integerfollowing: required, integerhtml_url: required, string, format: uritype: required, stringtotal_private_repos: integerowned_private_repos: integerprivate_gists: integer or nulldisk_usage: integer or nullcollaborators: integer or nullbilling_email: string or null, format: emailplan: object:
name: required, stringspace: required, integerprivate_repos: required, integerfilled_seats: integerseats: integerdefault_repository_permission: string or nulldefault_repository_branch: string or nullmembers_can_create_repositories: boolean or nulltwo_factor_requirement_enabled: boolean or nullmembers_allowed_repository_creation_type: stringmembers_can_create_public_repositories: booleanmembers_can_create_private_repositories: booleanmembers_can_create_internal_repositories: booleanmembers_can_create_pages: booleanmembers_can_create_public_pages: booleanmembers_can_create_private_pages: booleanmembers_can_delete_repositories: booleanmembers_can_change_repo_visibility: booleanmembers_can_invite_outside_collaborators: booleanmembers_can_delete_issues: booleandisplay_commenter_full_name_setting_enabled: booleanreaders_can_create_discussions: booleanmembers_can_create_teams: booleanmembers_can_view_dependency_insights: booleanmembers_can_fork_private_repositories: boolean or nullweb_commit_signoff_required: booleanadvanced_security_enabled_for_new_repositories: boolean, deprecateddependabot_alerts_enabled_for_new_repositories: boolean, deprecateddependabot_security_updates_enabled_for_new_repositories: boolean, deprecateddependency_graph_enabled_for_new_repositories: boolean, deprecatedsecret_scanning_enabled_for_new_repositories: boolean, deprecatedsecret_scanning_push_protection_enabled_for_new_repositories: boolean, deprecatedsecret_scanning_push_protection_custom_link: string or nullcreated_at: required, string, format: date-timeupdated_at: required, string, format: date-timearchived_at: required, string or null, format: date-timedeploy_keys_enabled_for_repositories: booleanPATCH /orgs/{org}
Warning
Closing down notice: GitHub will replace and discontinue members_allowed_repository_creation_type in favor of more granular permissions. The new input parameters are members_can_create_public_repositories, members_can_create_private_repositories for all organizations and members_can_create_internal_repositories for organizations associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see the blog post.
Warning
Closing down notice: Code security product enablement for new repositories through the organization API is closing down. Please use code security configurations to set defaults instead. For more information on setting a default security configuration, see the changelog.
Updates the organization's profile and member privileges.
The authenticated user must be an organization owner to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:org or repo scope to use this endpoint.
accept (string)application/vnd.github+json is recommended.org (string) (required)billing_email (string)
Billing email address. This address is not publicized.
company (string)
The company name.
email (string)
The publicly visible email address.
twitter_username (string)
The Twitter username of the company.
location (string)
The location.
name (string)
The shorthand name of the company.
description (string)
The description of the company. The maximum size is 160 characters.
has_organization_projects (boolean)
Whether an organization can use organization projects.
has_repository_projects (boolean)
Whether repositories that belong to the organization can use repository projects.
default_repository_permission (string)
Default permission level members have for organization repositories.
Default: read
Can be one of: read, write, admin, none
members_can_create_repositories (boolean)
Whether of non-admin organization members can create repositories. Note: A parameter can override this parameter. See members_allowed_repository_creation_type in this table for details.
Default: true
members_can_create_internal_repositories (boolean)
Whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. For more information, see "Restricting repository creation in your organization" in the GitHub Help documentation.
members_can_create_private_repositories (boolean)
Whether organization members can create private repositories, which are visible to organization members with permission. For more information, see "Restricting repository creation in your organization" in the GitHub Help documentation.
members_can_create_public_repositories (boolean)
Whether organization members can create public repositories, which are visible to anyone. For more information, see "Restricting repository creation in your organization" in the GitHub Help documentation.
members_allowed_repository_creation_type (string)
Specifies which types of repositories non-admin organization members can create. private is only available to repositories that are part of an organization on GitHub Enterprise Cloud.
Note: This parameter is closing down and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in members_can_create_repositories. See the parameter deprecation notice in the operation description for details.
Can be one of: all, private, none
members_can_create_pages (boolean)
Whether organization members can create GitHub Pages sites. Existing published sites will not be impacted.
Default: true
members_can_create_public_pages (boolean)
Whether organization members can create public GitHub Pages sites. Existing published sites will not be impacted.
Default: true
members_can_create_private_pages (boolean)
Whether organization members can create private GitHub Pages sites. Existing published sites will not be impacted.
Default: true
members_can_fork_private_repositories (boolean)
Whether organization members can fork private organization repositories.
Default: false
web_commit_signoff_required (boolean)
Whether contributors to organization repositories are required to sign off on commits they make through GitHub's web interface.
Default: false
blog (string)
advanced_security_enabled_for_new_repositories (boolean)
Endpoint closing down notice. Please use code security configurations instead.
Whether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred to this organization.
To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "Managing security managers in your organization."
You can check which security and analysis features are currently enabled by using a GET /orgs/{org} request.
dependabot_alerts_enabled_for_new_repositories (boolean)
Endpoint closing down notice. Please use code security configurations instead.
Whether Dependabot alerts are automatically enabled for new repositories and repositories transferred to this organization.
To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "Managing security managers in your organization."
You can check which security and analysis features are currently enabled by using a GET /orgs/{org} request.
dependabot_security_updates_enabled_for_new_repositories (boolean)
Endpoint closing down notice. Please use code security configurations instead.
Whether Dependabot security updates are automatically enabled for new repositories and repositories transferred to this organization.
To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "Managing security managers in your organization."
You can check which security and analysis features are currently enabled by using a GET /orgs/{org} request.
dependency_graph_enabled_for_new_repositories (boolean)
Endpoint closing down notice. Please use code security configurations instead.
Whether dependency graph is automatically enabled for new repositories and repositories transferred to this organization.
To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "Managing security managers in your organization."
You can check which security and analysis features are currently enabled by using a GET /orgs/{org} request.
secret_scanning_enabled_for_new_repositories (boolean)
Endpoint closing down notice. Please use code security configurations instead.
Whether secret scanning is automatically enabled for new repositories and repositories transferred to this organization.
To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "Managing security managers in your organization."
You can check which security and analysis features are currently enabled by using a GET /orgs/{org} request.
secret_scanning_push_protection_enabled_for_new_repositories (boolean)
Endpoint closing down notice. Please use code security configurations instead.
Whether secret scanning push protection is automatically enabled for new repositories and repositories transferred to this organization.
To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "Managing security managers in your organization."
You can check which security and analysis features are currently enabled by using a GET /orgs/{org} request.
secret_scanning_push_protection_custom_link (string)
If secret_scanning_push_protection_custom_link_enabled is true, the URL that will be displayed to contributors who are blocked from pushing a secret.
deploy_keys_enabled_for_repositories (boolean)
Controls whether or not deploy keys may be added and used for repositories in the organization.
200 - OK
409 - Conflict
422 - Validation failed
Request:
curl -L \
-X PATCH \
https://api.github.com/orgs/ORG \
-d '{
"billing_email": "mona@github.com",
"company": "GitHub",
"email": "mona@github.com",
"twitter_username": "github",
"location": "San Francisco",
"name": "github",
"description": "GitHub, the company.",
"default_repository_permission": "read",
"members_can_create_repositories": true,
"members_allowed_repository_creation_type": "all"
}'
Response schema (Status: 200):
Same response schema as Get an organization.
DELETE /orgs/{org}
Deletes an organization and all its repositories.
The organization login will be unavailable for 90 days after deletion.
Please review the Terms of Service regarding account deletion before using this endpoint:
https://docs.github.com/site-policy/github-terms/github-terms-of-service
accept (string)application/vnd.github+json is recommended.org (string) (required)202 - Accepted
403 - Forbidden
404 - Resource not found
451 - Validation failed, or the endpoint has been spammed.
Request:
curl -L \
-X DELETE \
https://api.github.com/orgs/ORG
Response schema (Status: 202):
object
GET /orgs/{org}/installations
Lists all GitHub Apps in an organization. The installation count includes
all GitHub Apps installed on repositories in the organization.
The authenticated user must be an organization owner to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:read scope to use this endpoint.
accept (string)application/vnd.github+json is recommended.org (string) (required)
The organization name. The name is not case sensitive.
per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
Request:
curl -L \
-X GET \
https://api.github.com/orgs/ORG/installations
Response schema (Status: 200):
total_count: required, integerinstallations: required, array of Installation:
id: required, integeraccount: required, any of:
name: string or nullemail: string or nulllogin: required, stringid: required, integer, format: int64node_id: required, stringavatar_url: required, string, format: urigravatar_id: required, string or nullurl: required, string, format: urihtml_url: required, string, format: urifollowers_url: required, string, format: urifollowing_url: required, stringgists_url: required, stringstarred_url: required, stringsubscriptions_url: required, string, format: uriorganizations_url: required, string, format: urirepos_url: required, string, format: urievents_url: required, stringreceived_events_url: required, string, format: uritype: required, stringsite_admin: required, booleanstarred_at: stringuser_view_type: stringdescription: string or nullhtml_url: required, string, format: uriwebsite_url: string or null, format: uriid: required, integernode_id: required, stringname: required, stringslug: required, stringcreated_at: required, string or null, format: date-timeupdated_at: required, string or null, format: date-timeavatar_url: required, string, format: urirepository_selection: required, string, enum: all, selectedaccess_tokens_url: required, string, format: urirepositories_url: required, string, format: urihtml_url: required, string, format: uriapp_id: required, integerclient_id: stringtarget_id: required, integertarget_type: required, stringpermissions: required, App Permissions:
actions: string, enum: read, writeadministration: string, enum: read, writeartifact_metadata: string, enum: read, writeattestations: string, enum: read, writechecks: string, enum: read, writecode_quality: string, enum: read, writecodespaces: string, enum: read, writecontents: string, enum: read, writedependabot_secrets: string, enum: read, writedeployments: string, enum: read, writediscussions: string, enum: read, writeenvironments: string, enum: read, writeissues: string, enum: read, writemerge_queues: string, enum: read, writemetadata: string, enum: read, writepackages: string, enum: read, writepages: string, enum: read, writepull_requests: string, enum: read, writerepository_custom_properties: string, enum: read, writerepository_hooks: string, enum: read, writerepository_projects: string, enum: read, write, adminsecret_scanning_alerts: string, enum: read, writesecrets: string, enum: read, writesecurity_events: string, enum: read, writesingle_file: string, enum: read, writestatuses: string, enum: read, writevulnerability_alerts: string, enum: read, writeworkflows: string, enum: writecustom_properties_for_organizations: string, enum: read, writemembers: string, enum: read, writeorganization_administration: string, enum: read, writeorganization_custom_roles: string, enum: read, writeorganization_custom_org_roles: string, enum: read, writeorganization_custom_properties: string, enum: read, write, adminorganization_copilot_seat_management: string, enum: read, writeorganization_copilot_agent_settings: string, enum: read, writeorganization_copilot_requests: string, enum: readorganization_external_properties_for_repos: string, enum: read, write, adminorganization_announcement_banners: string, enum: read, writeorganization_events: string, enum: readorganization_hooks: string, enum: read, writeorganization_personal_access_tokens: string, enum: read, writeorganization_personal_access_token_requests: string, enum: read, writeorganization_plan: string, enum: readorganization_projects: string, enum: read, write, adminorganization_packages: string, enum: read, writeorganization_secrets: string, enum: read, writeorganization_self_hosted_runners: string, enum: read, writeorganization_user_blocking: string, enum: read, writeemail_addresses: string, enum: read, writefollowers: string, enum: read, writegit_ssh_keys: string, enum: read, writegpg_keys: string, enum: read, writeinteraction_limits: string, enum: read, writeprofile: string, enum: writestarring: string, enum: read, writeenterprise_custom_properties_for_organizations: string, enum: read, write, adminevents: required, array of stringcreated_at: required, string, format: date-timeupdated_at: required, string, format: date-timesingle_file_name: required, string or nullhas_multiple_single_files: booleansingle_file_paths: array of stringapp_slug: required, stringsuspended_by: required, any of:
suspended_at: required, string or null, format: date-timecontact_email: string or nullGET /orgs/{org}/settings/immutable-releases
Gets the immutable releases policy for repositories in an organization.
OAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
accept (string)application/vnd.github+json is recommended.org (string) (required)Request:
curl -L \
-X GET \
https://api.github.com/orgs/ORG/settings/immutable-releases
Response schema (Status: 200):
enforced_repositories: required, string, enum: all, none, selectedselected_repositories_url: stringPUT /orgs/{org}/settings/immutable-releases
Sets the immutable releases policy for repositories in an organization.
OAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
accept (string)application/vnd.github+json is recommended.org (string) (required)enforced_repositories (string) (required)
The policy that controls how immutable releases are enforced in the organization.
Can be one of: all, none, selected
selected_repository_ids (array of integers)
An array of repository ids for which immutable releases enforcement should be applied. You can only provide a list of repository ids when the enforced_repositories is set to selected. You can add and remove individual repositories using the Enable a selected repository for immutable releases in an organization and Disable a selected repository for immutable releases in an organization endpoints.
Request:
curl -L \
-X PUT \
https://api.github.com/orgs/ORG/settings/immutable-releases \
-d '{
"enforced_repositories": "all"
}'
Response schema (Status: 204):
GET /orgs/{org}/settings/immutable-releases/repositories
List all of the repositories that have been selected for immutable releases enforcement in an organization.
OAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
accept (string)application/vnd.github+json is recommended.org (string) (required)
The organization name. The name is not case sensitive.
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
Request:
curl -L \
-X GET \
https://api.github.com/orgs/ORG/settings/immutable-releases/repositories
Response schema (Status: 200):
total_count: required, integerrepositories: required, array of Minimal Repository:
id: required, integer, format: int64node_id: required, stringname: required, stringfull_name: required, stringowner: required, Simple User:
name: string or nullemail: string or nulllogin: required, stringid: required, integer, format: int64node_id: required, stringavatar_url: required, string, format: urigravatar_id: required, string or nullurl: required, string, format: urihtml_url: required, string, format: urifollowers_url: required, string, format: urifollowing_url: required, stringgists_url: required, stringstarred_url: required, stringsubscriptions_url: required, string, format: uriorganizations_url: required, string, format: urirepos_url: required, string, format: urievents_url: required, stringreceived_events_url: required, string, format: uritype: required, stringsite_admin: required, booleanstarred_at: stringuser_view_type: stringprivate: required, booleanhtml_url: required, string, format: uridescription: required, string or nullfork: required, booleanurl: required, string, format: uriarchive_url: required, stringassignees_url: required, stringblobs_url: required, stringbranches_url: required, stringcollaborators_url: required, stringcomments_url: required, stringcommits_url: required, stringcompare_url: required, stringcontents_url: required, stringcontributors_url: required, string, format: urideployments_url: required, string, format: uridownloads_url: required, string, format: urievents_url: required, string, format: uriforks_url: required, string, format: urigit_commits_url: required, stringgit_refs_url: required, stringgit_tags_url: required, stringgit_url: stringissue_comment_url: required, stringissue_events_url: required, stringissues_url: required, stringkeys_url: required, stringlabels_url: required, stringlanguages_url: required, string, format: urimerges_url: required, string, format: urimilestones_url: required, stringnotifications_url: required, stringpulls_url: required, stringreleases_url: required, stringssh_url: stringstargazers_url: required, string, format: uristatuses_url: required, stringsubscribers_url: required, string, format: urisubscription_url: required, string, format: uritags_url: required, string, format: uriteams_url: required, string, format: uritrees_url: required, stringclone_url: stringmirror_url: string or nullhooks_url: required, string, format: urisvn_url: stringhomepage: string or nulllanguage: string or nullforks_count: integerstargazers_count: integerwatchers_count: integersize: integerdefault_branch: stringopen_issues_count: integeris_template: booleantopics: array of stringhas_issues: booleanhas_projects: booleanhas_wiki: booleanhas_pages: booleanhas_discussions: booleanhas_pull_requests: booleanpull_request_creation_policy: string, enum: all, collaborators_onlyarchived: booleandisabled: booleanvisibility: stringpushed_at: string or null, format: date-timecreated_at: string or null, format: date-timeupdated_at: string or null, format: date-timepermissions: object:
admin: booleanmaintain: booleanpush: booleantriage: booleanpull: booleanrole_name: stringtemp_clone_token: stringdelete_branch_on_merge: booleansubscribers_count: integernetwork_count: integercode_of_conduct: Code Of Conduct:
key: required, stringname: required, stringurl: required, string, format: uribody: stringhtml_url: required, string or null, format: urilicense: object or null:
key: stringname: stringspdx_id: stringurl: string or nullnode_id: stringforks: integeropen_issues: integerwatchers: integerallow_forking: booleanweb_commit_signoff_required: booleansecurity_and_analysis: object or null:
advanced_security: object:
status: string, enum: enabled, disabledcode_security: object:
status: string, enum: enabled, disableddependabot_security_updates: object:
status: string, enum: enabled, disabledsecret_scanning: object:
status: string, enum: enabled, disabledsecret_scanning_push_protection: object:
status: string, enum: enabled, disabledsecret_scanning_non_provider_patterns: object:
status: string, enum: enabled, disabledsecret_scanning_ai_detection: object:
status: string, enum: enabled, disabledsecret_scanning_delegated_alert_dismissal: object:
status: string, enum: enabled, disabledsecret_scanning_delegated_bypass: object:
status: string, enum: enabled, disabledsecret_scanning_delegated_bypass_options: object:
reviewers: array of objects:
reviewer_id: required, integerreviewer_type: required, string, enum: TEAM, ROLEmode: string, enum: ALWAYS, EXEMPT, default: "ALWAYS"custom_properties: object, additional properties allowedPUT /orgs/{org}/settings/immutable-releases/repositories
Replaces all repositories that have been selected for immutable releases enforcement in an organization. To use this endpoint, the organization immutable releases policy for enforced_repositories must be configured to selected.
OAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
accept (string)application/vnd.github+json is recommended.org (string) (required)selected_repository_ids (array of integers) (required)Request:
curl -L \
-X PUT \
https://api.github.com/orgs/ORG/settings/immutable-releases/repositories \
-d '{
"selected_repository_ids": [
64780797
]
}'
Response schema (Status: 204):
PUT /orgs/{org}/settings/immutable-releases/repositories/{repository_id}
Adds a repository to the list of selected repositories that are enforced for immutable releases in an organization. To use this endpoint, the organization immutable releases policy for enforced_repositories must be configured to selected.
OAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
accept (string)application/vnd.github+json is recommended.org (string) (required)
The organization name. The name is not case sensitive.
repository_id (integer) (required)
The unique identifier of the repository.
Request:
curl -L \
-X PUT \
https://api.github.com/orgs/ORG/settings/immutable-releases/repositories/REPOSITORY_ID
Response schema (Status: 204):
DELETE /orgs/{org}/settings/immutable-releases/repositories/{repository_id}
Removes a repository from the list of selected repositories that are enforced for immutable releases in an organization. To use this endpoint, the organization immutable releases policy for enforced_repositories must be configured to selected.
OAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.
accept (string)application/vnd.github+json is recommended.org (string) (required)
The organization name. The name is not case sensitive.
repository_id (integer) (required)
The unique identifier of the repository.
Request:
curl -L \
-X DELETE \
https://api.github.com/orgs/ORG/settings/immutable-releases/repositories/REPOSITORY_ID
Response schema (Status: 204):
POST /orgs/{org}/{security_product}/{enablement}
Warning
Closing down notice: The ability to enable or disable a security feature for all eligible repositories in an organization is closing down. Please use code security configurations instead. For more information, see the changelog.
Enables or disables the specified security feature for all eligible repositories in an organization. For more information, see "Managing security managers in your organization."
The authenticated user must be an organization owner or be member of a team with the security manager role to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the admin:org, write:org, or repo scopes to use this endpoint.
accept (string)application/vnd.github+json is recommended.org (string) (required)
The organization name. The name is not case sensitive.
security_product (string) (required)
The security feature to enable or disable.
Can be one of: dependency_graph, dependabot_alerts, dependabot_security_updates, advanced_security, code_scanning_default_setup, secret_scanning, secret_scanning_push_protection
enablement (string) (required)
The action to take.
enable_all means to enable the specified security feature for all repositories in the organization.
disable_all means to disable the specified security feature for all repositories in the organization.
Can be one of: enable_all, disable_all
query_suite (string)default, extended204 - Action started
422 - The action could not be taken due to an in progress enablement, or a policy is preventing enablement
Request:
curl -L \
-X POST \
https://api.github.com/orgs/ORG/SECURITY_PRODUCT/ENABLEMENT
Response schema (Status: 204):
GET /user/orgs
List organizations for the authenticated user.
For OAuth app tokens and personal access tokens (classic), this endpoint only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with read:org scope, you can publicize your organization membership with user scope, etc.). Therefore, this API requires at least user or read:org scope for OAuth app tokens and personal access tokens (classic). Requests with insufficient scope will receive a 403 Forbidden response.
Note
Requests using a fine-grained access token will receive a 200 Success response with an empty list.
accept (string)application/vnd.github+json is recommended.per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
200 - OK
304 - Not modified
401 - Requires authentication
403 - Forbidden
Request:
curl -L \
-X GET \
https://api.github.com/user/orgs
Response schema (Status: 200):
Same response schema as List organizations.
GET /users/{username}/orgs
List public organization memberships for the specified user.
This method only lists public memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the List organizations for the authenticated user API instead.
accept (string)application/vnd.github+json is recommended.username (string) (required)
The handle for the GitHub user account.
per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
Request:
curl -L \
-X GET \
https://api.github.com/users/USERNAME/orgs
Response schema (Status: 200):
Same response schema as List organizations.