{"meta":{"title":"REST API endpoints for organizations","intro":"Use the REST API to interact with organizations.","product":"REST API","breadcrumbs":[{"href":"/en/rest","title":"REST API"},{"href":"/en/rest/orgs","title":"Organizations"},{"href":"/en/rest/orgs/orgs","title":"Organizations"}],"documentType":"article"},"body":"# REST API endpoints for organizations\n\nUse the REST API to interact with organizations.\n\n\n> [!NOTE]\n> 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.\n\n\n## List organizations\n\n```\nGET /organizations\n```\n\nLists all organizations, in the order that they were created.\nNote\n\nPagination is powered exclusively by the since parameter. Use the Link header to get the URL for the next page of organizations.\n\n\n### Parameters\n\n\n#### Headers\n\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n\n\n#### Path and query parameters\n\n- **`since`** (integer)\n  An organization ID. Only return organizations with an ID greater than this ID.\n\n- **`per_page`** (integer)\n  The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"\n  Default: `30`\n\n\n\n\n\n\n### HTTP response status codes\n\n\n- **200** - OK\n\n\n- **304** - Not modified\n\n\n\n\n### Code examples\n\n\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/organizations\n```\n\n**Response schema (Status: 200):**\n\nArray of `Organization Simple`:\n  * `login`: required, string\n  * `id`: required, integer\n  * `node_id`: required, string\n  * `url`: required, string, format: uri\n  * `repos_url`: required, string, format: uri\n  * `events_url`: required, string, format: uri\n  * `hooks_url`: required, string\n  * `issues_url`: required, string\n  * `members_url`: required, string\n  * `public_members_url`: required, string\n  * `avatar_url`: required, string\n  * `description`: required, string or null\n\n\n\n\n\n## Get an organization\n\n```\nGET /orgs/{org}\n```\n\nGets information about an organization.\nWhen 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.\nTo see the full details about an organization, the authenticated user must be an organization owner.\nOAuth app tokens and personal access tokens (classic) need the admin:org scope to see the full details about an organization.\nTo see information about an organization's GitHub plan, GitHub Apps need the Organization plan permission.\n\n\n### Parameters\n\n\n#### Headers\n\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n\n\n#### Path and query parameters\n\n- **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n\n\n\n\n\n### HTTP response status codes\n\n\n- **200** - OK\n\n\n- **404** - Resource not found\n\n\n\n\n### Code examples\n\n\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/orgs/ORG\n```\n\n**Response schema (Status: 200):**\n\n* `login`: required, string\n* `id`: required, integer\n* `node_id`: required, string\n* `url`: required, string, format: uri\n* `repos_url`: required, string, format: uri\n* `events_url`: required, string, format: uri\n* `hooks_url`: required, string\n* `issues_url`: required, string\n* `members_url`: required, string\n* `public_members_url`: required, string\n* `avatar_url`: required, string\n* `description`: required, string or null\n* `name`: string\n* `company`: string\n* `blog`: string, format: uri\n* `location`: string\n* `email`: string, format: email\n* `twitter_username`: string or null\n* `is_verified`: boolean\n* `has_organization_projects`: required, boolean\n* `has_repository_projects`: required, boolean\n* `public_repos`: required, integer\n* `public_gists`: required, integer\n* `followers`: required, integer\n* `following`: required, integer\n* `html_url`: required, string, format: uri\n* `type`: required, string\n* `total_private_repos`: integer\n* `owned_private_repos`: integer\n* `private_gists`: integer or null\n* `disk_usage`: integer or null\n* `collaborators`: integer or null\n* `billing_email`: string or null, format: email\n* `plan`: object:\n  * `name`: required, string\n  * `space`: required, integer\n  * `private_repos`: required, integer\n  * `filled_seats`: integer\n  * `seats`: integer\n* `default_repository_permission`: string or null\n* `default_repository_branch`: string or null\n* `members_can_create_repositories`: boolean or null\n* `two_factor_requirement_enabled`: boolean or null\n* `members_allowed_repository_creation_type`: string\n* `members_can_create_public_repositories`: boolean\n* `members_can_create_private_repositories`: boolean\n* `members_can_create_internal_repositories`: boolean\n* `members_can_create_pages`: boolean\n* `members_can_create_public_pages`: boolean\n* `members_can_create_private_pages`: boolean\n* `members_can_delete_repositories`: boolean\n* `members_can_change_repo_visibility`: boolean\n* `members_can_invite_outside_collaborators`: boolean\n* `members_can_delete_issues`: boolean\n* `display_commenter_full_name_setting_enabled`: boolean\n* `readers_can_create_discussions`: boolean\n* `members_can_create_teams`: boolean\n* `members_can_view_dependency_insights`: boolean\n* `members_can_fork_private_repositories`: boolean or null\n* `web_commit_signoff_required`: boolean\n* `advanced_security_enabled_for_new_repositories`: boolean, deprecated\n* `dependabot_alerts_enabled_for_new_repositories`: boolean, deprecated\n* `dependabot_security_updates_enabled_for_new_repositories`: boolean, deprecated\n* `dependency_graph_enabled_for_new_repositories`: boolean, deprecated\n* `secret_scanning_enabled_for_new_repositories`: boolean, deprecated\n* `secret_scanning_push_protection_enabled_for_new_repositories`: boolean, deprecated\n* `secret_scanning_push_protection_custom_link`: string or null\n* `created_at`: required, string, format: date-time\n* `updated_at`: required, string, format: date-time\n* `archived_at`: required, string or null, format: date-time\n* `deploy_keys_enabled_for_repositories`: boolean\n\n\n\n\n\n## Update an organization\n\n```\nPATCH /orgs/{org}\n```\n\nWarning\n\nClosing 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.\n\nWarning\n\nClosing 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.\n\nUpdates the organization's profile and member privileges.\nThe authenticated user must be an organization owner to use this endpoint.\nOAuth app tokens and personal access tokens (classic) need the admin:org or repo scope to use this endpoint.\n\n\n### Parameters\n\n\n#### Headers\n\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n\n\n#### Path and query parameters\n\n- **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n\n\n\n#### Body parameters\n\n- **`billing_email`** (string)\n  Billing email address. This address is not publicized.\n\n- **`company`** (string)\n  The company name.\n\n- **`email`** (string)\n  The publicly visible email address.\n\n- **`twitter_username`** (string)\n  The Twitter username of the company.\n\n- **`location`** (string)\n  The location.\n\n- **`name`** (string)\n  The shorthand name of the company.\n\n- **`description`** (string)\n  The description of the company. The maximum size is 160 characters.\n\n- **`has_organization_projects`** (boolean)\n  Whether an organization can use organization projects.\n\n- **`has_repository_projects`** (boolean)\n  Whether repositories that belong to the organization can use repository projects.\n\n- **`default_repository_permission`** (string)\n  Default permission level members have for organization repositories.\n  Default: `read`\n  Can be one of: `read`, `write`, `admin`, `none`\n\n- **`members_can_create_repositories`** (boolean)\n  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.\n  Default: `true`\n\n- **`members_can_create_internal_repositories`** (boolean)\n  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.\n\n- **`members_can_create_private_repositories`** (boolean)\n  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.\n\n- **`members_can_create_public_repositories`** (boolean)\n  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.\n\n- **`members_allowed_repository_creation_type`** (string)\n  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.\nNote: 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.\n  Can be one of: `all`, `private`, `none`\n\n- **`members_can_create_pages`** (boolean)\n  Whether organization members can create GitHub Pages sites. Existing published sites will not be impacted.\n  Default: `true`\n\n- **`members_can_create_public_pages`** (boolean)\n  Whether organization members can create public GitHub Pages sites. Existing published sites will not be impacted.\n  Default: `true`\n\n- **`members_can_create_private_pages`** (boolean)\n  Whether organization members can create private GitHub Pages sites. Existing published sites will not be impacted.\n  Default: `true`\n\n- **`members_can_fork_private_repositories`** (boolean)\n  Whether organization members can fork private organization repositories.\n  Default: `false`\n\n- **`web_commit_signoff_required`** (boolean)\n  Whether contributors to organization repositories are required to sign off on commits they make through GitHub's web interface.\n  Default: `false`\n\n- **`blog`** (string)\n\n- **`advanced_security_enabled_for_new_repositories`** (boolean)\n  Endpoint closing down notice. Please use code security configurations instead.\nWhether GitHub Advanced Security is automatically enabled for new repositories and repositories transferred to this organization.\nTo 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.\"\nYou can check which security and analysis features are currently enabled by using a GET /orgs/{org} request.\n\n- **`dependabot_alerts_enabled_for_new_repositories`** (boolean)\n  Endpoint closing down notice. Please use code security configurations instead.\nWhether Dependabot alerts are automatically enabled for new repositories and repositories transferred to this organization.\nTo 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.\"\nYou can check which security and analysis features are currently enabled by using a GET /orgs/{org} request.\n\n- **`dependabot_security_updates_enabled_for_new_repositories`** (boolean)\n  Endpoint closing down notice. Please use code security configurations instead.\nWhether Dependabot security updates are automatically enabled for new repositories and repositories transferred to this organization.\nTo 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.\"\nYou can check which security and analysis features are currently enabled by using a GET /orgs/{org} request.\n\n- **`dependency_graph_enabled_for_new_repositories`** (boolean)\n  Endpoint closing down notice. Please use code security configurations instead.\nWhether dependency graph is automatically enabled for new repositories and repositories transferred to this organization.\nTo 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.\"\nYou can check which security and analysis features are currently enabled by using a GET /orgs/{org} request.\n\n- **`secret_scanning_enabled_for_new_repositories`** (boolean)\n  Endpoint closing down notice. Please use code security configurations instead.\nWhether secret scanning is automatically enabled for new repositories and repositories transferred to this organization.\nTo 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.\"\nYou can check which security and analysis features are currently enabled by using a GET /orgs/{org} request.\n\n- **`secret_scanning_push_protection_enabled_for_new_repositories`** (boolean)\n  Endpoint closing down notice. Please use code security configurations instead.\nWhether secret scanning push protection is automatically enabled for new repositories and repositories transferred to this organization.\nTo 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.\"\nYou can check which security and analysis features are currently enabled by using a GET /orgs/{org} request.\n\n- **`secret_scanning_push_protection_custom_link`** (string)\n  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.\n\n- **`deploy_keys_enabled_for_repositories`** (boolean)\n  Controls whether or not deploy keys may be added and used for repositories in the organization.\n\n\n\n\n\n### HTTP response status codes\n\n\n- **200** - OK\n\n\n- **409** - Conflict\n\n\n- **422** - Validation failed\n\n\n\n\n### Code examples\n\n\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X PATCH \\\n  https://api.github.com/orgs/ORG \\\n  -d '{\n  \"billing_email\": \"mona@github.com\",\n  \"company\": \"GitHub\",\n  \"email\": \"mona@github.com\",\n  \"twitter_username\": \"github\",\n  \"location\": \"San Francisco\",\n  \"name\": \"github\",\n  \"description\": \"GitHub, the company.\",\n  \"default_repository_permission\": \"read\",\n  \"members_can_create_repositories\": true,\n  \"members_allowed_repository_creation_type\": \"all\"\n}'\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [Get an organization](#get-an-organization).\n\n\n\n\n\n## Delete an organization\n\n```\nDELETE /orgs/{org}\n```\n\nDeletes an organization and all its repositories.\nThe organization login will be unavailable for 90 days after deletion.\nPlease review the Terms of Service regarding account deletion before using this endpoint:\nhttps://docs.github.com/site-policy/github-terms/github-terms-of-service\n\n\n### Parameters\n\n\n#### Headers\n\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n\n\n#### Path and query parameters\n\n- **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n\n\n\n\n\n### HTTP response status codes\n\n\n- **202** - Accepted\n\n\n- **403** - Forbidden\n\n\n- **404** - Resource not found\n\n\n- **451** - Validation failed, or the endpoint has been spammed.\n\n\n\n\n### Code examples\n\n\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X DELETE \\\n  https://api.github.com/orgs/ORG\n```\n\n**Response schema (Status: 202):**\n\nobject\n\n\n\n\n\n## List app installations for an organization\n\n```\nGET /orgs/{org}/installations\n```\n\nLists all GitHub Apps in an organization. The installation count includes\nall GitHub Apps installed on repositories in the organization.\nThe authenticated user must be an organization owner to use this endpoint.\nOAuth app tokens and personal access tokens (classic) need the admin:read scope to use this endpoint.\n\n\n### Parameters\n\n\n#### Headers\n\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n\n\n#### Path and query parameters\n\n- **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n- **`per_page`** (integer)\n  The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"\n  Default: `30`\n\n- **`page`** (integer)\n  The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"\n  Default: `1`\n\n\n\n\n\n\n### HTTP response status codes\n\n\n- **200** - OK\n\n\n\n\n### Code examples\n\n\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/orgs/ORG/installations\n```\n\n**Response schema (Status: 200):**\n\n* `total_count`: required, integer\n* `installations`: required, array of `Installation`:\n  * `id`: required, integer\n  * `account`: required, any of:\n    * **Simple User**\n      * `name`: string or null\n      * `email`: string or null\n      * `login`: required, string\n      * `id`: required, integer, format: int64\n      * `node_id`: required, string\n      * `avatar_url`: required, string, format: uri\n      * `gravatar_id`: required, string or null\n      * `url`: required, string, format: uri\n      * `html_url`: required, string, format: uri\n      * `followers_url`: required, string, format: uri\n      * `following_url`: required, string\n      * `gists_url`: required, string\n      * `starred_url`: required, string\n      * `subscriptions_url`: required, string, format: uri\n      * `organizations_url`: required, string, format: uri\n      * `repos_url`: required, string, format: uri\n      * `events_url`: required, string\n      * `received_events_url`: required, string, format: uri\n      * `type`: required, string\n      * `site_admin`: required, boolean\n      * `starred_at`: string\n      * `user_view_type`: string\n    * **Enterprise**\n      * `description`: string or null\n      * `html_url`: required, string, format: uri\n      * `website_url`: string or null, format: uri\n      * `id`: required, integer\n      * `node_id`: required, string\n      * `name`: required, string\n      * `slug`: required, string\n      * `created_at`: required, string or null, format: date-time\n      * `updated_at`: required, string or null, format: date-time\n      * `avatar_url`: required, string, format: uri\n  * `repository_selection`: required, string, enum: `all`, `selected`\n  * `access_tokens_url`: required, string, format: uri\n  * `repositories_url`: required, string, format: uri\n  * `html_url`: required, string, format: uri\n  * `app_id`: required, integer\n  * `client_id`: string\n  * `target_id`: required, integer\n  * `target_type`: required, string\n  * `permissions`: required, `App Permissions`:\n    * `actions`: string, enum: `read`, `write`\n    * `administration`: string, enum: `read`, `write`\n    * `artifact_metadata`: string, enum: `read`, `write`\n    * `attestations`: string, enum: `read`, `write`\n    * `checks`: string, enum: `read`, `write`\n    * `codespaces`: string, enum: `read`, `write`\n    * `contents`: string, enum: `read`, `write`\n    * `dependabot_secrets`: string, enum: `read`, `write`\n    * `deployments`: string, enum: `read`, `write`\n    * `discussions`: string, enum: `read`, `write`\n    * `environments`: string, enum: `read`, `write`\n    * `issues`: string, enum: `read`, `write`\n    * `merge_queues`: string, enum: `read`, `write`\n    * `metadata`: string, enum: `read`, `write`\n    * `packages`: string, enum: `read`, `write`\n    * `pages`: string, enum: `read`, `write`\n    * `pull_requests`: string, enum: `read`, `write`\n    * `repository_custom_properties`: string, enum: `read`, `write`\n    * `repository_hooks`: string, enum: `read`, `write`\n    * `repository_projects`: string, enum: `read`, `write`, `admin`\n    * `secret_scanning_alerts`: string, enum: `read`, `write`\n    * `secrets`: string, enum: `read`, `write`\n    * `security_events`: string, enum: `read`, `write`\n    * `single_file`: string, enum: `read`, `write`\n    * `statuses`: string, enum: `read`, `write`\n    * `vulnerability_alerts`: string, enum: `read`, `write`\n    * `workflows`: string, enum: `write`\n    * `custom_properties_for_organizations`: string, enum: `read`, `write`\n    * `members`: string, enum: `read`, `write`\n    * `organization_administration`: string, enum: `read`, `write`\n    * `organization_custom_roles`: string, enum: `read`, `write`\n    * `organization_custom_org_roles`: string, enum: `read`, `write`\n    * `organization_custom_properties`: string, enum: `read`, `write`, `admin`\n    * `organization_copilot_seat_management`: string, enum: `write`\n    * `organization_copilot_agent_settings`: string, enum: `read`, `write`\n    * `organization_announcement_banners`: string, enum: `read`, `write`\n    * `organization_events`: string, enum: `read`\n    * `organization_hooks`: string, enum: `read`, `write`\n    * `organization_personal_access_tokens`: string, enum: `read`, `write`\n    * `organization_personal_access_token_requests`: string, enum: `read`, `write`\n    * `organization_plan`: string, enum: `read`\n    * `organization_projects`: string, enum: `read`, `write`, `admin`\n    * `organization_packages`: string, enum: `read`, `write`\n    * `organization_secrets`: string, enum: `read`, `write`\n    * `organization_self_hosted_runners`: string, enum: `read`, `write`\n    * `organization_user_blocking`: string, enum: `read`, `write`\n    * `email_addresses`: string, enum: `read`, `write`\n    * `followers`: string, enum: `read`, `write`\n    * `git_ssh_keys`: string, enum: `read`, `write`\n    * `gpg_keys`: string, enum: `read`, `write`\n    * `interaction_limits`: string, enum: `read`, `write`\n    * `profile`: string, enum: `write`\n    * `starring`: string, enum: `read`, `write`\n    * `enterprise_custom_properties_for_organizations`: string, enum: `read`, `write`, `admin`\n  * `events`: required, array of string\n  * `created_at`: required, string, format: date-time\n  * `updated_at`: required, string, format: date-time\n  * `single_file_name`: required, string or null\n  * `has_multiple_single_files`: boolean\n  * `single_file_paths`: array of string\n  * `app_slug`: required, string\n  * `suspended_by`: required, any of:\n    * **null**\n    * **Simple User**\n      * `name`: string or null\n      * `email`: string or null\n      * `login`: required, string\n      * `id`: required, integer, format: int64\n      * `node_id`: required, string\n      * `avatar_url`: required, string, format: uri\n      * `gravatar_id`: required, string or null\n      * `url`: required, string, format: uri\n      * `html_url`: required, string, format: uri\n      * `followers_url`: required, string, format: uri\n      * `following_url`: required, string\n      * `gists_url`: required, string\n      * `starred_url`: required, string\n      * `subscriptions_url`: required, string, format: uri\n      * `organizations_url`: required, string, format: uri\n      * `repos_url`: required, string, format: uri\n      * `events_url`: required, string\n      * `received_events_url`: required, string, format: uri\n      * `type`: required, string\n      * `site_admin`: required, boolean\n      * `starred_at`: string\n      * `user_view_type`: string\n  * `suspended_at`: required, string or null, format: date-time\n  * `contact_email`: string or null\n\n\n\n\n\n## Get immutable releases settings for an organization\n\n```\nGET /orgs/{org}/settings/immutable-releases\n```\n\nGets the immutable releases policy for repositories in an organization.\nOAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.\n\n\n### Parameters\n\n\n#### Headers\n\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n\n\n#### Path and query parameters\n\n- **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n\n\n\n\n\n### HTTP response status codes\n\n\n- **200** - Immutable releases settings response\n\n\n\n\n### Code examples\n\n\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/orgs/ORG/settings/immutable-releases\n```\n\n**Response schema (Status: 200):**\n\n* `enforced_repositories`: required, string, enum: `all`, `none`, `selected`\n* `selected_repositories_url`: string\n\n\n\n\n\n## Set immutable releases settings for an organization\n\n```\nPUT /orgs/{org}/settings/immutable-releases\n```\n\nSets the immutable releases policy for repositories in an organization.\nOAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.\n\n\n### Parameters\n\n\n#### Headers\n\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n\n\n#### Path and query parameters\n\n- **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n\n\n\n#### Body parameters\n\n- **`enforced_repositories`** (string) (required)\n  The policy that controls how immutable releases are enforced in the organization.\n  Can be one of: `all`, `none`, `selected`\n\n- **`selected_repository_ids`** (array of integers)\n  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.\n\n\n\n\n\n### HTTP response status codes\n\n\n- **204** - No Content\n\n\n\n\n### Code examples\n\n\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X PUT \\\n  https://api.github.com/orgs/ORG/settings/immutable-releases \\\n  -d '{\n  \"enforced_repositories\": \"all\"\n}'\n```\n\n**Response schema (Status: 204):**\n\n\n\n\n\n## List selected repositories for immutable releases enforcement\n\n```\nGET /orgs/{org}/settings/immutable-releases/repositories\n```\n\nList all of the repositories that have been selected for immutable releases enforcement in an organization.\nOAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.\n\n\n### Parameters\n\n\n#### Headers\n\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n\n\n#### Path and query parameters\n\n- **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n- **`page`** (integer)\n  The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"\n  Default: `1`\n\n- **`per_page`** (integer)\n  The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"\n  Default: `30`\n\n\n\n\n\n\n### HTTP response status codes\n\n\n- **200** - OK\n\n\n\n\n### Code examples\n\n\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/orgs/ORG/settings/immutable-releases/repositories\n```\n\n**Response schema (Status: 200):**\n\n* `total_count`: required, integer\n* `repositories`: required, array of `Minimal Repository`:\n  * `id`: required, integer, format: int64\n  * `node_id`: required, string\n  * `name`: required, string\n  * `full_name`: required, string\n  * `owner`: required, `Simple User`:\n    * `name`: string or null\n    * `email`: string or null\n    * `login`: required, string\n    * `id`: required, integer, format: int64\n    * `node_id`: required, string\n    * `avatar_url`: required, string, format: uri\n    * `gravatar_id`: required, string or null\n    * `url`: required, string, format: uri\n    * `html_url`: required, string, format: uri\n    * `followers_url`: required, string, format: uri\n    * `following_url`: required, string\n    * `gists_url`: required, string\n    * `starred_url`: required, string\n    * `subscriptions_url`: required, string, format: uri\n    * `organizations_url`: required, string, format: uri\n    * `repos_url`: required, string, format: uri\n    * `events_url`: required, string\n    * `received_events_url`: required, string, format: uri\n    * `type`: required, string\n    * `site_admin`: required, boolean\n    * `starred_at`: string\n    * `user_view_type`: string\n  * `private`: required, boolean\n  * `html_url`: required, string, format: uri\n  * `description`: required, string or null\n  * `fork`: required, boolean\n  * `url`: required, string, format: uri\n  * `archive_url`: required, string\n  * `assignees_url`: required, string\n  * `blobs_url`: required, string\n  * `branches_url`: required, string\n  * `collaborators_url`: required, string\n  * `comments_url`: required, string\n  * `commits_url`: required, string\n  * `compare_url`: required, string\n  * `contents_url`: required, string\n  * `contributors_url`: required, string, format: uri\n  * `deployments_url`: required, string, format: uri\n  * `downloads_url`: required, string, format: uri\n  * `events_url`: required, string, format: uri\n  * `forks_url`: required, string, format: uri\n  * `git_commits_url`: required, string\n  * `git_refs_url`: required, string\n  * `git_tags_url`: required, string\n  * `git_url`: string\n  * `issue_comment_url`: required, string\n  * `issue_events_url`: required, string\n  * `issues_url`: required, string\n  * `keys_url`: required, string\n  * `labels_url`: required, string\n  * `languages_url`: required, string, format: uri\n  * `merges_url`: required, string, format: uri\n  * `milestones_url`: required, string\n  * `notifications_url`: required, string\n  * `pulls_url`: required, string\n  * `releases_url`: required, string\n  * `ssh_url`: string\n  * `stargazers_url`: required, string, format: uri\n  * `statuses_url`: required, string\n  * `subscribers_url`: required, string, format: uri\n  * `subscription_url`: required, string, format: uri\n  * `tags_url`: required, string, format: uri\n  * `teams_url`: required, string, format: uri\n  * `trees_url`: required, string\n  * `clone_url`: string\n  * `mirror_url`: string or null\n  * `hooks_url`: required, string, format: uri\n  * `svn_url`: string\n  * `homepage`: string or null\n  * `language`: string or null\n  * `forks_count`: integer\n  * `stargazers_count`: integer\n  * `watchers_count`: integer\n  * `size`: integer\n  * `default_branch`: string\n  * `open_issues_count`: integer\n  * `is_template`: boolean\n  * `topics`: array of string\n  * `has_issues`: boolean\n  * `has_projects`: boolean\n  * `has_wiki`: boolean\n  * `has_pages`: boolean\n  * `has_discussions`: boolean\n  * `has_pull_requests`: boolean\n  * `pull_request_creation_policy`: string, enum: `all`, `collaborators_only`\n  * `archived`: boolean\n  * `disabled`: boolean\n  * `visibility`: string\n  * `pushed_at`: string or null, format: date-time\n  * `created_at`: string or null, format: date-time\n  * `updated_at`: string or null, format: date-time\n  * `permissions`: object:\n    * `admin`: boolean\n    * `maintain`: boolean\n    * `push`: boolean\n    * `triage`: boolean\n    * `pull`: boolean\n  * `role_name`: string\n  * `temp_clone_token`: string\n  * `delete_branch_on_merge`: boolean\n  * `subscribers_count`: integer\n  * `network_count`: integer\n  * `code_of_conduct`: `Code Of Conduct`:\n    * `key`: required, string\n    * `name`: required, string\n    * `url`: required, string, format: uri\n    * `body`: string\n    * `html_url`: required, string or null, format: uri\n  * `license`: object or null:\n    * `key`: string\n    * `name`: string\n    * `spdx_id`: string\n    * `url`: string or null\n    * `node_id`: string\n  * `forks`: integer\n  * `open_issues`: integer\n  * `watchers`: integer\n  * `allow_forking`: boolean\n  * `web_commit_signoff_required`: boolean\n  * `security_and_analysis`: object or null:\n    * `advanced_security`: object:\n      * `status`: string, enum: `enabled`, `disabled`\n    * `code_security`: object:\n      * `status`: string, enum: `enabled`, `disabled`\n    * `dependabot_security_updates`: object:\n      * `status`: string, enum: `enabled`, `disabled`\n    * `secret_scanning`: object:\n      * `status`: string, enum: `enabled`, `disabled`\n    * `secret_scanning_push_protection`: object:\n      * `status`: string, enum: `enabled`, `disabled`\n    * `secret_scanning_non_provider_patterns`: object:\n      * `status`: string, enum: `enabled`, `disabled`\n    * `secret_scanning_ai_detection`: object:\n      * `status`: string, enum: `enabled`, `disabled`\n    * `secret_scanning_delegated_alert_dismissal`: object:\n      * `status`: string, enum: `enabled`, `disabled`\n    * `secret_scanning_delegated_bypass`: object:\n      * `status`: string, enum: `enabled`, `disabled`\n    * `secret_scanning_delegated_bypass_options`: object:\n      * `reviewers`: array of objects:\n        * `reviewer_id`: required, integer\n        * `reviewer_type`: required, string, enum: `TEAM`, `ROLE`\n        * `mode`: string, enum: `ALWAYS`, `EXEMPT`, default: `\"ALWAYS\"`\n  * `custom_properties`: object, additional properties allowed\n\n\n\n\n\n## Set selected repositories for immutable releases enforcement\n\n```\nPUT /orgs/{org}/settings/immutable-releases/repositories\n```\n\nReplaces 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.\nOAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.\n\n\n### Parameters\n\n\n#### Headers\n\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n\n\n#### Path and query parameters\n\n- **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n\n\n\n#### Body parameters\n\n- **`selected_repository_ids`** (array of integers) (required)\n  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.\n\n\n\n\n\n### HTTP response status codes\n\n\n- **204** - No Content\n\n\n\n\n### Code examples\n\n\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X PUT \\\n  https://api.github.com/orgs/ORG/settings/immutable-releases/repositories \\\n  -d '{\n  \"selected_repository_ids\": [\n    64780797\n  ]\n}'\n```\n\n**Response schema (Status: 204):**\n\n\n\n\n\n## Enable a selected repository for immutable releases in an organization\n\n```\nPUT /orgs/{org}/settings/immutable-releases/repositories/{repository_id}\n```\n\nAdds 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.\nOAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.\n\n\n### Parameters\n\n\n#### Headers\n\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n\n\n#### Path and query parameters\n\n- **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n- **`repository_id`** (integer) (required)\n  The unique identifier of the repository.\n\n\n\n\n\n\n### HTTP response status codes\n\n\n- **204** - No Content\n\n\n\n\n### Code examples\n\n\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X PUT \\\n  https://api.github.com/orgs/ORG/settings/immutable-releases/repositories/REPOSITORY_ID\n```\n\n**Response schema (Status: 204):**\n\n\n\n\n\n## Disable a selected repository for immutable releases in an organization\n\n```\nDELETE /orgs/{org}/settings/immutable-releases/repositories/{repository_id}\n```\n\nRemoves 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.\nOAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.\n\n\n### Parameters\n\n\n#### Headers\n\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n\n\n#### Path and query parameters\n\n- **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n- **`repository_id`** (integer) (required)\n  The unique identifier of the repository.\n\n\n\n\n\n\n### HTTP response status codes\n\n\n- **204** - No Content\n\n\n\n\n### Code examples\n\n\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X DELETE \\\n  https://api.github.com/orgs/ORG/settings/immutable-releases/repositories/REPOSITORY_ID\n```\n\n**Response schema (Status: 204):**\n\n\n\n\n\n## Enable or disable a security feature for an organization\n\n```\nPOST /orgs/{org}/{security_product}/{enablement}\n```\n\nWarning\n\nClosing 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.\n\nEnables or disables the specified security feature for all eligible repositories in an organization. For more information, see \"Managing security managers in your organization.\"\nThe authenticated user must be an organization owner or be member of a team with the security manager role to use this endpoint.\nOAuth app tokens and personal access tokens (classic) need the admin:org, write:org, or repo scopes to use this endpoint.\n\n\n### Parameters\n\n\n#### Headers\n\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n\n\n#### Path and query parameters\n\n- **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n- **`security_product`** (string) (required)\n  The security feature to enable or disable.\n  Can be one of: `dependency_graph`, `dependabot_alerts`, `dependabot_security_updates`, `advanced_security`, `code_scanning_default_setup`, `secret_scanning`, `secret_scanning_push_protection`\n\n- **`enablement`** (string) (required)\n  The action to take.\nenable_all means to enable the specified security feature for all repositories in the organization.\ndisable_all means to disable the specified security feature for all repositories in the organization.\n  Can be one of: `enable_all`, `disable_all`\n\n\n\n\n#### Body parameters\n\n- **`query_suite`** (string)\n  CodeQL query suite to be used. If you specify the query_suite parameter, the default setup will be configured with this query suite only on all repositories that didn't have default setup already configured. It will not change the query suite on repositories that already have default setup configured.\nIf you don't specify any query_suite in your request, the preferred query suite of the organization will be applied.\n  Can be one of: `default`, `extended`\n\n\n\n\n\n### HTTP response status codes\n\n\n- **204** - Action started\n\n\n- **422** - The action could not be taken due to an in progress enablement, or a policy is preventing enablement\n\n\n\n\n### Code examples\n\n\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  https://api.github.com/orgs/ORG/SECURITY_PRODUCT/ENABLEMENT\n```\n\n**Response schema (Status: 204):**\n\n\n\n\n\n## List organizations for the authenticated user\n\n```\nGET /user/orgs\n```\n\nList organizations for the authenticated user.\nFor 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.\nNote\n\nRequests using a fine-grained access token will receive a 200 Success response with an empty list.\n\n\n### Parameters\n\n\n#### Headers\n\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n\n\n#### Path and query parameters\n\n- **`per_page`** (integer)\n  The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"\n  Default: `30`\n\n- **`page`** (integer)\n  The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"\n  Default: `1`\n\n\n\n\n\n\n### HTTP response status codes\n\n\n- **200** - OK\n\n\n- **304** - Not modified\n\n\n- **401** - Requires authentication\n\n\n- **403** - Forbidden\n\n\n\n\n### Code examples\n\n\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/user/orgs\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [List organizations](#list-organizations).\n\n\n\n\n\n## List organizations for a user\n\n```\nGET /users/{username}/orgs\n```\n\nList public organization memberships for the specified user.\nThis 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.\n\n\n### Parameters\n\n\n#### Headers\n\n\n- **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n\n\n#### Path and query parameters\n\n- **`username`** (string) (required)\n  The handle for the GitHub user account.\n\n- **`per_page`** (integer)\n  The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"\n  Default: `30`\n\n- **`page`** (integer)\n  The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"\n  Default: `1`\n\n\n\n\n\n\n### HTTP response status codes\n\n\n- **200** - OK\n\n\n\n\n### Code examples\n\n\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/users/USERNAME/orgs\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [List organizations](#list-organizations)."}