name | example | route | scope | type |
---|---|---|---|---|
Update an organization |
octokit.rest.orgs.update({ org }) |
PATCH /orgs/{org} |
orgs |
API method |
Parameter Deprecation 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.
Updates the organization's profile and member privileges.
With security configurations (beta), your organization can choose a default security configuration which will automatically apply a set of security enablement settings to new repositories in your organization based on their visibility. For targeted repositories, the following attributes will be overridden by the default security configuration:
- advanced_security_enabled_for_new_repositories
- dependabot_alerts_enabled_for_new_repositories
- dependabot_security_updates_enabled_for_new_repositories
- dependency_graph_enabled_for_new_repositories
- secret_scanning_enabled_for_new_repositories
- secret_scanning_push_protection_enabled_for_new_repositories
For more information on setting a default security configuration, see "Enabling security features at scale."
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.
octokit.rest.orgs.update({
org,
});
name | required | description |
---|---|---|
org | yes |
The organization name. The name is not case sensitive. |
billing_email | no |
Billing email address. This address is not publicized. |
company | no |
The company name. |
no |
The publicly visible email address. | |
twitter_username | no |
The Twitter username of the company. |
location | no |
The location. |
name | no |
The shorthand name of the company. |
description | no |
The description of the company. The maximum size is 160 characters. |
has_organization_projects | no |
Whether an organization can use organization projects. |
has_repository_projects | no |
Whether repositories that belong to the organization can use repository projects. |
default_repository_permission | no |
Default permission level members have for organization repositories. |
members_can_create_repositories | no |
Whether of non-admin organization members can create repositories. Note: A parameter can override this parameter. See |
members_can_create_internal_repositories | no |
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 | no |
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 | no |
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 | no |
Specifies which types of repositories non-admin organization members can create. |
members_can_create_pages | no |
Whether organization members can create GitHub Pages sites. Existing published sites will not be impacted. |
members_can_create_public_pages | no |
Whether organization members can create public GitHub Pages sites. Existing published sites will not be impacted. |
members_can_create_private_pages | no |
Whether organization members can create private GitHub Pages sites. Existing published sites will not be impacted. |
members_can_fork_private_repositories | no |
Whether organization members can fork private organization repositories. |
web_commit_signoff_required | no |
Whether contributors to organization repositories are required to sign off on commits they make through GitHub's web interface. |
blog | no | |
advanced_security_enabled_for_new_repositories | no |
Whether GitHub Advanced Security is automatically enabled for new repositories. 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 |
dependabot_alerts_enabled_for_new_repositories | no |
Whether Dependabot alerts is automatically enabled for new repositories. 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 |
dependabot_security_updates_enabled_for_new_repositories | no |
Whether Dependabot security updates is automatically enabled for new repositories. 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 |
dependency_graph_enabled_for_new_repositories | no |
Whether dependency graph is automatically enabled for new repositories. 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 |
secret_scanning_enabled_for_new_repositories | no |
Whether secret scanning is automatically enabled for new repositories. 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 |
secret_scanning_push_protection_enabled_for_new_repositories | no |
Whether secret scanning push protection is automatically enabled for new repositories. 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 |
secret_scanning_push_protection_custom_link_enabled | no |
Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection. |
secret_scanning_push_protection_custom_link | no |
If |
See also: GitHub Developer Guide documentation.