Get an organization
To see many of the organization response values, you need to be an authenticated organization owner with the admin:org
scope. When the value of two_factor_requirement_enabled
is true
, the organization requires all members, billing managers, and outside collaborators to enable two-factor authentication.
GitHub Apps with the Organization plan
permission can use this endpoint to retrieve information about an organization’s GitHub Enterprise Server plan. See “Authenticating with GitHub Apps” for details. For an example response, see ‘Response with GitHub Enterprise Server plan information’ below."
Path Parameters
Response
application/json
Response
Response
Organization Full
Organization Full
Example:github
Example:1
Example:MDEyOk9yZ2FuaXphdGlvbjE=
Example:https://api.github.com/orgs/github
Example:https://api.github.com/orgs/github/repos
Example:https://api.github.com/orgs/github/events
Example:https://api.github.com/orgs/github/hooks
Example:https://api.github.com/orgs/github/issues
Example:https://api.github.com/orgs/github/members{/member}
Example:https://api.github.com/orgs/github/public_members{/member}
Example:https://github.com/images/error/octocat_happy.gif
Example:A great organization
Example:github
Example:GitHub
Example:https://github.com/blog
Example:San Francisco
Example:octocat@github.com
Example:github
Example:true
Example:true
Example:true
Example:2
Example:1
Example:20
Example:0
Example:https://github.com/octocat
Example:2008-01-14T04:33:35Z
Example:Organization
Example:100
Example:100
Example:81
Example:10000
Example:8
Example:org@example.com
Show Child Parameters
Example:true
Example:true
Example:all
Example:true
Example:true
Example:true
Example:true
Example:true
Example:true
Example:false
Path Parameters
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 to update the organization’s profile and member privileges.
Path Parameters
Body
application/json
Body
Billing email address. This address is not publicized.
The company name.
The publicly visible email address.
The Twitter username of the company.
The location.
The shorthand name of the company.
The description of the company.
Toggles whether an organization can use organization projects.
Toggles whether repositories that belong to the organization can use repository projects.
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.
Allowed values:readwriteadminnone
Default:read
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: true
Note: A parameter can override this parameter. See members_allowed_repository_creation_type
in this table for details. Note: A parameter can override this parameter. See members_allowed_repository_creation_type
in this table for details.
Default:true
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.
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.
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.
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 the parameter deprecation notice in the operation description for details.
Allowed values:allprivatenone
Toggles whether organization members can create GitHub Pages sites. Can be one of:
* true
- all organization members can create GitHub Pages sites.
* false
- no organization members can create GitHub Pages sites. Existing published sites will not be impacted.
Default:true
Toggles whether organization members can fork private organization repositories. Can be one of:
* true
- all organization members can fork private repositories within the organization.
* false
- no organization members can fork private repositories within the organization.
Default:false
Example:"http://github.blog"
Response
application/json
Response
Response
Organization Full
Organization Full
Example:github
Example:1
Example:MDEyOk9yZ2FuaXphdGlvbjE=
Example:https://api.github.com/orgs/github
Example:https://api.github.com/orgs/github/repos
Example:https://api.github.com/orgs/github/events
Example:https://api.github.com/orgs/github/hooks
Example:https://api.github.com/orgs/github/issues
Example:https://api.github.com/orgs/github/members{/member}
Example:https://api.github.com/orgs/github/public_members{/member}
Example:https://github.com/images/error/octocat_happy.gif
Example:A great organization
Example:github
Example:GitHub
Example:https://github.com/blog
Example:San Francisco
Example:octocat@github.com
Example:github
Example:true
Example:true
Example:true
Example:2
Example:1
Example:20
Example:0
Example:https://github.com/octocat
Example:2008-01-14T04:33:35Z
Example:Organization
Example:100
Example:100
Example:81
Example:10000
Example:8
Example:org@example.com
Show Child Parameters
Example:true
Example:true
Example:all
Example:true
Example:true
Example:true
Example:true
Example:true
Example:true
Example:false
Path Parameters
Body
List organization webhooks
Query Parameters
Results per page (max 100)
Default:30
Page number of the results to fetch.
Default:1
Path Parameters
Response
application/json
Response
Response
Org Hook
Example:1
Example:https://api.github.com/orgs/octocat/hooks/1
Example:https://api.github.com/orgs/octocat/hooks/1/pings
Example:web
Example:["push","pull_request"]
Example:true
Show Child Parameters
Example:2011-09-06T20:39:23Z
Example:2011-09-06T17:26:27Z
Path Parameters
Query Parameters
Create an organization webhook
Here’s how you can create a hook that posts payloads in JSON format:
Path Parameters
Body
application/json
Body
Must be passed as “web”.
Key/value pairs to provide settings for this webhook. These are defined below.
Show Child Parameters
Determines if notifications are sent when the webhook is triggered. Set to true
to send notifications.
Default:true
Response
application/json
Response
Response
Org Hook
Org Hook
Example:1
Example:https://api.github.com/orgs/octocat/hooks/1
Example:https://api.github.com/orgs/octocat/hooks/1/pings
Example:web
Example:["push","pull_request"]
Example:true
Show Child Parameters
Example:2011-09-06T20:39:23Z
Example:2011-09-06T17:26:27Z
Path Parameters
Body
Get an organization webhook
Returns a webhook configured in an organization. To get only the webhook config
properties, see “Get a webhook configuration for an organization.”
Path Parameters
Response
application/json
Response
Response
Org Hook
Org Hook
Example:1
Example:https://api.github.com/orgs/octocat/hooks/1
Example:https://api.github.com/orgs/octocat/hooks/1/pings
Example:web
Example:["push","pull_request"]
Example:true
Show Child Parameters
Example:2011-09-06T20:39:23Z
Example:2011-09-06T17:26:27Z