Get an organization
Gets information about an organization.
When the value of two_factor_requirement_enabled is true, the organization requires all members, billing managers, outside collaborators, guest collaborators, repository collaborators, or everyone with access to any repository within the organization to enable two-factor authentication.
To see the full details about an organization, the authenticated user must be an organization owner.
OAuth app tokens and personal access tokens (classic) need the admin:org scope to see the full details about an organization.
To see information about an organization’s GitHub plan, GitHub Apps need the Organization plan permission.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The organization name. The name is not case sensitive.
Responses
Section titled “ Responses ”Response
Organization Full
object
The number of collaborators on private repositories.
This field may be null if the number of private repositories is over 50,000.
object
The default branch for repositories created in this organization.
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.
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.
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.
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.
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.
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.
Whether a custom link is shown to contributors who are blocked from pushing a secret by push protection.
An optional URL string to display to contributors who are blocked from pushing a secret.
Controls whether or not deploy keys may be added and used for repositories in the organization.
Examples
{ "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}Resource not found
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}