v50

latestOpenAPI 3.0.3MITraw.githubusercontent.com2023-07-147873273.9 MB
orgs

Update an organization

Parameter Deprecation Notice: GitHub Enterprise Server 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 or the repo scope to update the organization's profile and member privileges.

patch/orgs/{org}

Path parameters

orgstring required

The organization name. The name is not case sensitive.

Request body

billing_emailstring

Billing email address. This address is not publicized.

companystring

The company name.

emailstring

The publicly visible email address.

twitter_usernamestring

The Twitter username of the company.

locationstring

The location.

namestring

The shorthand name of the company.

descriptionstring

The description of the company.

has_organization_projectsboolean

Whether an organization can use organization projects.

has_repository_projectsboolean

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

default_repository_permission'read' | 'write' | 'admin' | 'none'

Default permission level members have for organization repositories.

members_can_create_repositoriesboolean

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.

members_can_create_internal_repositoriesboolean

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_repositoriesboolean

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_repositoriesboolean

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'all' | 'private' | 'none'

Specifies which types of repositories non-admin organization members can create. 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 the parameter deprecation notice in the operation description for details.

members_can_create_pagesboolean

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

members_can_fork_private_repositoriesboolean

Whether organization members can fork private organization repositories.

blogstring

Example request

{
  "blog": "\"http://github.blog\""
}

Response

Response

loginstring required
idinteger required
node_idstring required
urlstring uri required
repos_urlstring uri required
events_urlstring uri required
hooks_urlstring required
issues_urlstring required
members_urlstring required
public_members_urlstring required
avatar_urlstring required
descriptionstring nullable required
namestring
companystring
blogstring uri
locationstring
emailstring email
twitter_usernamestring nullable
is_verifiedboolean
has_organization_projectsboolean required
has_repository_projectsboolean required
public_reposinteger required
public_gistsinteger required
followersinteger required
followinginteger required
html_urlstring uri required
typestring required
total_private_reposinteger
owned_private_reposinteger
private_gistsinteger nullable
disk_usageinteger nullable
collaboratorsinteger nullable
billing_emailstring email nullable
default_repository_permissionstring nullable
members_can_create_repositoriesboolean nullable
two_factor_requirement_enabledboolean nullable
members_allowed_repository_creation_typestring
members_can_create_public_repositoriesboolean
members_can_create_private_repositoriesboolean
members_can_create_internal_repositoriesboolean
members_can_create_pagesboolean
members_can_create_public_pagesboolean
members_can_create_private_pagesboolean
members_can_fork_private_repositoriesboolean nullable
created_atstring date-time required
updated_atstring date-time required

Example response

{
  "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,
  "html_url": "https://github.com/octocat",
  "type": "Organization",
  "total_private_repos": 100,
  "owned_private_repos": 100,
  "private_gists": 81,
  "disk_usage": 10000,
  "collaborators": 8,
  "billing_email": "org@example.com",
  "members_can_create_repositories": true,
  "two_factor_requirement_enabled": true,
  "members_allowed_repository_creation_type": "all",
  "members_can_create_public_repositories": true,
  "members_can_create_private_repositories": true,
  "members_can_create_internal_repositories": true,
  "members_can_create_pages": true,
  "members_can_create_public_pages": true,
  "members_can_create_private_pages": true,
  "created_at": "2008-01-14T04:33:35Z"
}