Skip to content

Update an organization

PATCH
/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.

API method documentation

org
required
string

The organization name. The name is not case sensitive.

Media type application/json
object
billing_email

Billing email address. This address is not publicized.

string
company

The company name.

string
email

The publicly visible email address.

string
twitter_username

The Twitter username of the company.

string
location

The location.

string
name

The shorthand name of the company.

string
description

The description of the company. The maximum size is 160 characters.

string
has_organization_projects

Whether an organization can use organization projects.

boolean
has_repository_projects

Whether repositories that belong to the organization can use repository projects.

boolean
default_repository_permission

Default permission level members have for organization repositories.

string
default: read
Allowed values: read write admin none
members_can_create_repositories

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.

boolean
default: true
members_can_create_internal_repositories

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.

boolean
members_can_create_private_repositories

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.

boolean
members_can_create_public_repositories

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.

boolean
members_allowed_repository_creation_type

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.

string
Allowed values: all private none
members_can_create_pages

Whether organization members can create GitHub Pages sites. Existing published sites will not be impacted.

boolean
default: true
members_can_create_public_pages

Whether organization members can create public GitHub Pages sites. Existing published sites will not be impacted.

boolean
default: true
members_can_create_private_pages

Whether organization members can create private GitHub Pages sites. Existing published sites will not be impacted.

boolean
default: true
members_can_fork_private_repositories

Whether organization members can fork private organization repositories.

boolean
web_commit_signoff_required

Whether contributors to organization repositories are required to sign off on commits they make through GitHub’s web interface.

boolean
blog
string
advanced_security_enabled_for_new_repositories

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.

boolean
dependabot_alerts_enabled_for_new_repositories

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.

boolean
dependabot_security_updates_enabled_for_new_repositories

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.

boolean
dependency_graph_enabled_for_new_repositories

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.

boolean
secret_scanning_enabled_for_new_repositories

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.

boolean
secret_scanning_push_protection_enabled_for_new_repositories

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.

boolean
secret_scanning_push_protection_custom_link_enabled

Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection.

boolean
secret_scanning_push_protection_custom_link

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.

string
deploy_keys_enabled_for_repositories

Controls whether or not deploy keys may be added and used for repositories in the organization.

boolean
Examples
Example default
{
"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

Media type application/json
Organization Full

Organization Full

object
login
required
string
id
required
integer
node_id
required
string
url
required
string format: uri
repos_url
required
string format: uri
events_url
required
string format: uri
hooks_url
required
string
issues_url
required
string
members_url
required
string
public_members_url
required
string
avatar_url
required
string
description
required
string
nullable
name
string
company
string
blog
string format: uri
location
string
email
string format: email
twitter_username
string
nullable
is_verified
boolean
has_organization_projects
required
boolean
has_repository_projects
required
boolean
public_repos
required
integer
public_gists
required
integer
followers
required
integer
following
required
integer
html_url
required
string format: uri
type
required
string
total_private_repos
integer
owned_private_repos
integer
private_gists
integer
nullable
disk_usage
integer
nullable
collaborators

The number of collaborators on private repositories.

This field may be null if the number of private repositories is over 50,000.

integer
nullable
billing_email
string format: email
nullable
plan
object
name
required
string
space
required
integer
private_repos
required
integer
filled_seats
integer
seats
integer
default_repository_permission
string
nullable
default_repository_branch

The default branch for repositories created in this organization.

string
nullable
members_can_create_repositories
boolean
nullable
two_factor_requirement_enabled
boolean
nullable
members_allowed_repository_creation_type
string
members_can_create_public_repositories
boolean
members_can_create_private_repositories
boolean
members_can_create_internal_repositories
boolean
members_can_create_pages
boolean
members_can_create_public_pages
boolean
members_can_create_private_pages
boolean
members_can_delete_repositories
boolean
members_can_change_repo_visibility
boolean
members_can_invite_outside_collaborators
boolean
members_can_delete_issues
boolean
display_commenter_full_name_setting_enabled
boolean
readers_can_create_discussions
boolean
members_can_create_teams
boolean
members_can_view_dependency_insights
boolean
members_can_fork_private_repositories
boolean
nullable
web_commit_signoff_required
boolean
advanced_security_enabled_for_new_repositories

Endpoint closing down notice. Please use code security configurations instead.

Whether GitHub Advanced Security is enabled for new repositories and repositories transferred to this organization.

This field is only visible to organization owners or members of a team with the security manager role.

boolean
dependabot_alerts_enabled_for_new_repositories

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.

This field is only visible to organization owners or members of a team with the security manager role.

boolean
dependabot_security_updates_enabled_for_new_repositories

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.

This field is only visible to organization owners or members of a team with the security manager role.

boolean
dependency_graph_enabled_for_new_repositories

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.

This field is only visible to organization owners or members of a team with the security manager role.

boolean
secret_scanning_enabled_for_new_repositories

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.

This field is only visible to organization owners or members of a team with the security manager role.

boolean
secret_scanning_push_protection_enabled_for_new_repositories

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.

This field is only visible to organization owners or members of a team with the security manager role.

boolean
secret_scanning_push_protection_custom_link_enabled

Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection.

boolean
secret_scanning_push_protection_custom_link

An optional URL string to display to contributors who are blocked from pushing a secret.

string
nullable
created_at
required
string format: date-time
updated_at
required
string format: date-time
archived_at
required
string format: date-time
nullable
deploy_keys_enabled_for_repositories

Controls whether or not deploy keys may be added and used for repositories in the organization.

boolean
Examples
Example default
{
"login": "github",
"id": 1,
"node_id": "MDEyOk9yZ2FuaXphdGlvbjE=",
"url": "https://api.github.com/orgs/github",
"repos_url": "https://api.github.com/orgs/github/repos",
"events_url": "https://api.github.com/orgs/github/events",
"hooks_url": "https://api.github.com/orgs/github/hooks",
"issues_url": "https://api.github.com/orgs/github/issues",
"members_url": "https://api.github.com/orgs/github/members{/member}",
"public_members_url": "https://api.github.com/orgs/github/public_members{/member}",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"description": "A great organization",
"name": "github",
"company": "GitHub",
"blog": "https://github.com/blog",
"location": "San Francisco",
"email": "octocat@github.com",
"twitter_username": "github",
"is_verified": true,
"has_organization_projects": true,
"has_repository_projects": true,
"public_repos": 2,
"public_gists": 1,
"followers": 20,
"following": 0,
"html_url": "https://github.com/octocat",
"created_at": "2008-01-14T04:33:35Z",
"type": "Organization",
"total_private_repos": 100,
"owned_private_repos": 100,
"private_gists": 81,
"disk_usage": 10000,
"collaborators": 8,
"billing_email": "mona@github.com",
"plan": {
"name": "Medium",
"space": 400,
"private_repos": 20,
"filled_seats": 4,
"seats": 5
},
"default_repository_permission": "read",
"default_repository_branch": "main",
"members_can_create_repositories": true,
"two_factor_requirement_enabled": true,
"members_allowed_repository_creation_type": "all",
"members_can_create_public_repositories": false,
"members_can_create_private_repositories": false,
"members_can_create_internal_repositories": false,
"members_can_create_pages": true,
"members_can_create_public_pages": true,
"members_can_create_private_pages": true,
"members_can_delete_repositories": true,
"members_can_change_repo_visibility": true,
"members_can_invite_outside_collaborators": true,
"members_can_delete_issues": false,
"display_commenter_full_name_setting_enabled": false,
"readers_can_create_discussions": true,
"members_can_create_teams": true,
"members_can_view_dependency_insights": true,
"members_can_fork_private_repositories": false,
"web_commit_signoff_required": false,
"updated_at": "2014-03-03T18:58:10Z",
"deploy_keys_enabled_for_repositories": false,
"dependency_graph_enabled_for_new_repositories": false,
"dependabot_alerts_enabled_for_new_repositories": false,
"dependabot_security_updates_enabled_for_new_repositories": false,
"advanced_security_enabled_for_new_repositories": false,
"secret_scanning_enabled_for_new_repositories": false,
"secret_scanning_push_protection_enabled_for_new_repositories": false,
"secret_scanning_push_protection_custom_link": "https://github.com/octo-org/octo-repo/blob/main/im-blocked.md",
"secret_scanning_push_protection_custom_link_enabled": false
}

Conflict

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Validation failed

Media type application/json
One of:
Validation Error

Validation Error

object
message
required
string
documentation_url
required
string
errors
Array<object>
object
resource
string
field
string
message
string
code
required
string
index
integer
value
One of:
string
nullable
Example generated
{
"message": "example",
"documentation_url": "example",
"errors": [
{
"resource": "example",
"field": "example",
"message": "example",
"code": "example",
"index": 1,
"value": [
"example"
]
}
]
}