Note: New repository creation permissions are available to preview. You can now use members_can_create_public_repositories, members_can_create_private_repositories, and members_can_create_internal_repositories. 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+. These parameters provide more granular permissions to configure the type of repositories organization members can create.
To access these new parameters during the preview period, you must provide a custom media type in the Accept header:
application/vnd.github.surtur-preview+json
Warning: The API may change without advance notice during the preview period. Preview features are not supported for production use. If you experience any issues, contact GitHub Support or GitHub Premium Support.
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.
Enables an authenticated organization owner with the admin:org scope to update the organization's profile and member privileges.
PATCH /orgs/:org
| Name | Type | Description |
|---|---|---|
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. |
has_organization_projects |
boolean |
Toggles whether an organization can use organization projects. |
has_repository_projects |
boolean |
Toggles whether repositories that belong to the organization can use repository projects. |
default_repository_permission |
string |
Default permission level members have for organization repositories: * read - can pull, but not push to or administer this repository.* write - can pull and push, but not administer this repository.* admin - can pull, push, and administer this repository.* none - no permissions granted by default.Default: read |
members_can_create_repositories |
boolean |
Toggles the ability of non-admin organization members to create repositories. Can be one of: * true - all organization members can create repositories.* false - only organization owners can create repositories.Default: trueNote: A parameter can override this parameter. See members_allowed_repository_creation_type in this table for details. |
members_can_create_internal_repositories |
boolean |
Toggles 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+. Can be one of: * true - all organization members can create internal repositories.* false - only organization owners can create internal repositories.Default: true. For more information, see "Restricting repository creation in your organization" in the GitHub Help documentation. |
members_can_create_private_repositories |
boolean |
Toggles whether organization members can create private repositories, which are visible to organization members with permission. Can be one of: * true - all organization members can create private repositories.* false - only organization owners can create private repositories.Default: true. For more information, see "Restricting repository creation in your organization" in the GitHub Help documentation. |
members_can_create_public_repositories |
boolean |
Toggles whether organization members can create public repositories, which are visible to anyone. Can be one of: * true - all organization members can create public repositories.* false - only organization owners can create public repositories.Default: true. 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. Can be one of: * all - all organization members can create public and private repositories.* private - members can create private repositories. This option is only available to repositories that are part of an organization on GitHub Enterprise Cloud.* none - only admin members can create repositories. Note: This parameter is deprecated 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 this note for details. |
{
"billing_email": "support@github.com",
"blog": "https://github.com/blog",
"company": "GitHub",
"email": "support@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"
}
Status: 200 OK
{
"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": "support@github.com",
"plan": {
"name": "Medium",
"space": 400,
"private_repos": 20
},
"default_repository_permission": "read",
"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
}