GitHub: Teams schemas
8 GitHub schemas with complete fields and constraints.
← Teams operations · All schemas
Check team permissions for a repository — response body — Team Repository
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A team's access to a repository. |
allow_auto_merge | boolean | Optional | Whether to allow Auto-merge to be used on pull requests. Default: false |
allow_forking | boolean | Optional | Whether to allow forking this repo Default: false |
allow_merge_commit | boolean | Optional | Whether to allow merge commits for pull requests. Default: true |
allow_rebase_merge | boolean | Optional | Whether to allow rebase merges for pull requests. Default: true |
allow_squash_merge | boolean | Optional | Whether to allow squash merges for pull requests. Default: true |
archive_url | string | Required within parent | |
archived | boolean | Required within parent | Whether the repository is archived. Default: false |
assignees_url | string | Required within parent | |
blobs_url | string | Required within parent | |
branches_url | string | Required within parent | |
clone_url | string | Required within parent | |
collaborators_url | string | Required within parent | |
comments_url | string | Required within parent | |
commits_url | string | Required within parent | |
compare_url | string | Required within parent | |
contents_url | string | Required within parent | |
contributors_url | string | Required within parent | Format: uri |
created_at | JSON | Required within parent | |
created_at (anyOf 1) | string | Alternative | Format: date-time |
created_at (anyOf 2) | null | Alternative | |
default_branch | string | Required within parent | The default branch of the repository. |
delete_branch_on_merge | boolean | Optional | Whether to delete head branches when pull requests are merged Default: false |
deployments_url | string | Required within parent | Format: uri |
description | JSON | Required within parent | |
description (anyOf 1) | string | Alternative | |
description (anyOf 2) | null | Alternative | |
disabled | boolean | Required within parent | Returns whether or not this repository disabled. |
downloads_url | string | Required within parent | Format: uri |
events_url | string | Required within parent | Format: uri |
fork | boolean | Required within parent | |
forks | JSON | Required within parent | |
forks (anyOf 1) | integer | Alternative | |
forks (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
forks_count | JSON | Required within parent | |
forks_count (anyOf 1) | integer | Alternative | |
forks_count (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
forks_url | string | Required within parent | Format: uri |
full_name | string | Required within parent | |
git_commits_url | string | Required within parent | |
git_refs_url | string | Required within parent | |
git_tags_url | string | Required within parent | |
git_url | string | Required within parent | |
has_issues | boolean | Required within parent | Whether issues are enabled. Default: true |
has_pages | boolean | Required within parent | |
has_projects | boolean | Required within parent | Whether projects are enabled. Default: true |
has_wiki | boolean | Required within parent | Whether the wiki is enabled. Default: true |
homepage | JSON | Required within parent | |
homepage (anyOf 1) | string | Alternative | Format: uri |
homepage (anyOf 2) | null | Alternative | |
hooks_url | string | Required within parent | Format: uri |
html_url | string | Required within parent | Format: uri |
id | JSON | Required within parent | |
id (anyOf 1) | integer | Alternative | Unique identifier of the repository |
id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
is_template | boolean | Optional | Whether this repository acts as a template that can be used to generate new repositories. Default: false |
issue_comment_url | string | Required within parent | |
issue_events_url | string | Required within parent | |
issues_url | string | Required within parent | |
keys_url | string | Required within parent | |
labels_url | string | Required within parent | |
language | JSON | Required within parent | |
language (anyOf 1) | string | Alternative | |
language (anyOf 2) | null | Alternative | |
languages_url | string | Required within parent | Format: uri |
license | Model | Required within parent | Expand Create a fork — response body — license |
master_branch | string | Optional | |
merges_url | string | Required within parent | Format: uri |
milestones_url | string | Required within parent | |
mirror_url | JSON | Required within parent | |
mirror_url (anyOf 1) | string | Alternative | Format: uri |
mirror_url (anyOf 2) | null | Alternative | |
name | string | Required within parent | The name of the repository. |
network_count | JSON | Optional | |
network_count (anyOf 1) | integer | Alternative | |
network_count (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
node_id | string | Required within parent | |
notifications_url | string | Required within parent | |
open_issues | JSON | Required within parent | |
open_issues (anyOf 1) | integer | Alternative | |
open_issues (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
open_issues_count | JSON | Required within parent | |
open_issues_count (anyOf 1) | integer | Alternative | |
open_issues_count (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
owner | Model | Required within parent | Expand Get an issue — response body — user |
permissions | object | Optional | |
permissions.admin | boolean | Required within parent | |
permissions.maintain | boolean | Optional | |
permissions.pull | boolean | Required within parent | |
permissions.push | boolean | Required within parent | |
permissions.triage | boolean | Optional | |
private | boolean | Required within parent | Whether the repository is private or public. Default: false |
pulls_url | string | Required within parent | |
pushed_at | JSON | Required within parent | |
pushed_at (anyOf 1) | string | Alternative | Format: date-time |
pushed_at (anyOf 2) | null | Alternative | |
releases_url | string | Required within parent | |
role_name | string | Optional | |
size | JSON | Required within parent | |
size (anyOf 1) | integer | Alternative | |
size (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
ssh_url | string | Required within parent | |
stargazers_count | JSON | Required within parent | |
stargazers_count (anyOf 1) | integer | Alternative | |
stargazers_count (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
stargazers_url | string | Required within parent | Format: uri |
statuses_url | string | Required within parent | |
subscribers_count | JSON | Optional | |
subscribers_count (anyOf 1) | integer | Alternative | |
subscribers_count (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
subscribers_url | string | Required within parent | Format: uri |
subscription_url | string | Required within parent | Format: uri |
svn_url | string | Required within parent | Format: uri |
tags_url | string | Required within parent | Format: uri |
teams_url | string | Required within parent | Format: uri |
temp_clone_token | string | Optional | When present and non-empty, a temporary credential for read-only Git access to this repository. It expires five minutes after generation and cannot be used to push changes. Treat this value as sensitive and avoid recording it in logs. |
topics | array | Optional | |
topics[] | string | Each item | |
trees_url | string | Required within parent | |
updated_at | JSON | Required within parent | |
updated_at (anyOf 1) | string | Alternative | Format: date-time |
updated_at (anyOf 2) | null | Alternative | |
url | string | Required within parent | Format: uri |
visibility | string | Optional | The repository visibility: public, private, or internal. Default: public |
watchers | JSON | Required within parent | |
watchers (anyOf 1) | integer | Alternative | |
watchers (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
watchers_count | JSON | Required within parent | |
watchers_count (anyOf 1) | integer | Alternative | |
watchers_count (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
web_commit_signoff_required | boolean | Optional | Whether to require contributors to sign off on web-based commits Default: false |
Referenced models: Create a fork — response body — license, Get an issue — response body — user
Create a team — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Groups of organization members that gives permissions on specified repositories. |
created_at | string | Required within parent | Format: date-time |
description | JSON | Required within parent | |
description (anyOf 1) | string | Alternative | |
description (anyOf 2) | null | Alternative | |
enterprise_id | JSON | Optional | |
enterprise_id (anyOf 1) | integer | Alternative | Unique identifier of the enterprise to which this team belongs |
enterprise_id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
html_url | string | Required within parent | Format: uri |
id | JSON | Required within parent | |
id (anyOf 1) | integer | Alternative | Unique identifier of the team |
id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
ldap_dn | string | Optional | The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. |
members_count | JSON | Required within parent | |
members_count (anyOf 1) | integer | Alternative | |
members_count (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
members_url | string | Required within parent | |
name | string | Required within parent | Name of the team |
node_id | string | Required within parent | |
notification_setting | string | Optional | The notification setting the team has set Known values: notifications_enabled, notifications_disabled |
organization | Model | Required within parent | Expand Create a team — response body — organization |
organization_id | JSON | Optional | |
organization_id (anyOf 1) | integer | Alternative | Unique identifier of the organization to which this team belongs |
organization_id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
parent | Model | Optional | Expand Create a team — response body — parent |
permission | string | Required within parent | Permission that the team will have for its repositories |
privacy | string | Optional | The level of privacy this team should have Known values: closed, secret |
repos_count | JSON | Required within parent | |
repos_count (anyOf 1) | integer | Alternative | |
repos_count (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
repositories_url | string | Required within parent | Format: uri |
slug | string | Required within parent | |
type | string | Required within parent | The ownership type of the team Known values: enterprise, organization |
updated_at | string | Required within parent | Format: date-time |
url | string | Required within parent | URL for the team Format: uri |
Referenced models: Create a team — response body — parent, Create a team — response body — organization
Create a team — response body — organization
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Team Organization |
archived_at | JSON | Required within parent | |
archived_at (anyOf 1) | string | Alternative | Format: date-time |
archived_at (anyOf 2) | null | Alternative | |
avatar_url | string | Required within parent | |
billing_email | JSON | Optional | |
billing_email (anyOf 1) | string | Alternative | Format: email |
billing_email (anyOf 2) | null | Alternative | |
blog | JSON | Optional | |
blog (anyOf 1) | string | Alternative | Format: uri |
blog (anyOf 2) | null | Alternative | |
collaborators | JSON | Optional | |
collaborators (anyOf 1) | JSON | Alternative | |
collaborators (anyOf 1) (anyOf 1) | integer | Alternative | |
collaborators (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
collaborators (anyOf 2) | null | Alternative | |
company | JSON | Optional | |
company (anyOf 1) | string | Alternative | |
company (anyOf 2) | null | Alternative | |
created_at | string | Required within parent | Format: date-time |
default_repository_permission | JSON | Optional | |
default_repository_permission (anyOf 1) | string | Alternative | |
default_repository_permission (anyOf 2) | null | Alternative | |
description | JSON | Required within parent | |
description (anyOf 1) | string | Alternative | |
description (anyOf 2) | null | Alternative | |
disk_usage | JSON | Optional | |
disk_usage (anyOf 1) | JSON | Alternative | |
disk_usage (anyOf 1) (anyOf 1) | integer | Alternative | |
disk_usage (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
disk_usage (anyOf 2) | null | Alternative | |
email | JSON | Optional | |
email (anyOf 1) | string | Alternative | Format: email |
email (anyOf 2) | null | Alternative | |
events_url | string | Required within parent | Format: uri |
followers | JSON | Required within parent | |
followers (anyOf 1) | integer | Alternative | |
followers (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
following | JSON | Required within parent | |
following (anyOf 1) | integer | Alternative | |
following (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
has_organization_projects | boolean | Required within parent | |
has_repository_projects | boolean | Required within parent | |
hooks_url | string | Required within parent | |
html_url | string | Required within parent | Format: uri |
id | JSON | Required within parent | |
id (anyOf 1) | integer | Alternative | |
id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
is_verified | boolean | Optional | |
issues_url | string | Required within parent | |
location | JSON | Optional | |
location (anyOf 1) | string | Alternative | |
location (anyOf 2) | null | Alternative | |
login | string | Required within parent | |
members_allowed_repository_creation_type | string | Optional | |
members_can_create_internal_repositories | boolean | Optional | |
members_can_create_pages | boolean | Optional | |
members_can_create_private_pages | boolean | Optional | |
members_can_create_private_repositories | boolean | Optional | |
members_can_create_public_pages | boolean | Optional | |
members_can_create_public_repositories | boolean | Optional | |
members_can_create_repositories | JSON | Optional | |
members_can_create_repositories (anyOf 1) | boolean | Alternative | |
members_can_create_repositories (anyOf 2) | null | Alternative | |
members_can_fork_private_repositories | JSON | Optional | |
members_can_fork_private_repositories (anyOf 1) | boolean | Alternative | |
members_can_fork_private_repositories (anyOf 2) | null | Alternative | |
members_url | string | Required within parent | |
name | string | Optional | |
node_id | string | Required within parent | |
owned_private_repos | JSON | Optional | |
owned_private_repos (anyOf 1) | integer | Alternative | |
owned_private_repos (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
plan | Model | Optional | Expand Get an organization — response body — plan |
private_gists | JSON | Optional | |
private_gists (anyOf 1) | JSON | Alternative | |
private_gists (anyOf 1) (anyOf 1) | integer | Alternative | |
private_gists (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
private_gists (anyOf 2) | null | Alternative | |
public_gists | JSON | Required within parent | |
public_gists (anyOf 1) | integer | Alternative | |
public_gists (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
public_members_url | string | Required within parent | |
public_repos | JSON | Required within parent | |
public_repos (anyOf 1) | integer | Alternative | |
public_repos (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
repos_url | string | Required within parent | Format: uri |
total_private_repos | JSON | Optional | |
total_private_repos (anyOf 1) | integer | Alternative | |
total_private_repos (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
twitter_username | JSON | Optional | |
twitter_username (anyOf 1) | string | Alternative | |
twitter_username (anyOf 2) | null | Alternative | |
two_factor_requirement_enabled | JSON | Optional | |
two_factor_requirement_enabled (anyOf 1) | boolean | Alternative | |
two_factor_requirement_enabled (anyOf 2) | null | Alternative | |
type | string | Required within parent | |
updated_at | string | Required within parent | Format: date-time |
url | string | Required within parent | Format: uri |
web_commit_signoff_required | boolean | Optional |
Referenced models: Get an organization — response body — plan
Create a team — response body — parent
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | Model | Alternative | Expand Create a team — response body — parent / type: enterprise, organization |
$ (anyOf 2) | null | Alternative |
Referenced models: Create a team — response body — parent / type: enterprise, organization
Create a team — response body — parent / type: enterprise, organization
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Groups of organization members that gives permissions on specified repositories. |
description | JSON | Required within parent | |
description (anyOf 1) | string | Alternative | Description of the team |
description (anyOf 2) | null | Alternative | |
enterprise_id | JSON | Optional | |
enterprise_id (anyOf 1) | integer | Alternative | Unique identifier of the enterprise to which this team belongs |
enterprise_id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
html_url | string | Required within parent | Format: uri |
id | JSON | Required within parent | |
id (anyOf 1) | integer | Alternative | Unique identifier of the team |
id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
ldap_dn | string | Optional | Distinguished Name (DN) that team maps to within LDAP environment |
members_url | string | Required within parent | |
name | string | Required within parent | Name of the team |
node_id | string | Required within parent | |
notification_setting | string | Optional | The notification setting the team has set |
organization_id | JSON | Optional | |
organization_id (anyOf 1) | integer | Alternative | Unique identifier of the organization to which this team belongs |
organization_id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
permission | string | Required within parent | Permission that the team will have for its repositories |
privacy | string | Optional | The level of privacy this team should have |
repositories_url | string | Required within parent | Format: uri |
slug | string | Required within parent | |
type | string | Required within parent | The ownership type of the team Known values: enterprise, organization |
url | string | Required within parent | URL for the team Format: uri |
Get team membership for a user — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Team Membership |
role | string | Required within parent | The role of the user in the team. Known values: member, maintainer Default: member |
state | string | Required within parent | The state of the user's membership in the team. Known values: active, pending |
url | string | Required within parent | Format: uri |
List team members — response body — item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A user that is a member of a team, including their role on the team and whether the membership is inherited from a child team. |
avatar_url | string | Required within parent | Format: uri |
email | JSON | Optional | |
email (anyOf 1) | string | Alternative | |
email (anyOf 2) | null | Alternative | |
events_url | string | Required within parent | |
followers_url | string | Required within parent | Format: uri |
following_url | string | Required within parent | |
gists_url | string | Required within parent | |
gravatar_id | JSON | Required within parent | |
gravatar_id (anyOf 1) | string | Alternative | |
gravatar_id (anyOf 2) | null | Alternative | |
html_url | string | Required within parent | Format: uri |
id | JSON | Required within parent | |
id (anyOf 1) | integer | Alternative | Format: int64 |
id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
inherited | boolean | Optional | Whether the user is a member of the team only through a child team. `true` means the membership is inherited from a child team; `false` means the user is a direct (immediate) member of the team. Only present on the `List team members` endpoint, and only when the feature is enabled for the organization. |
login | string | Required within parent | |
name | JSON | Optional | |
name (anyOf 1) | string | Alternative | |
name (anyOf 2) | null | Alternative | |
node_id | string | Required within parent | |
organizations_url | string | Required within parent | Format: uri |
received_events_url | string | Required within parent | Format: uri |
repos_url | string | Required within parent | Format: uri |
role | string | Optional | The member's role on the team. Only present on the `List team members` endpoint, and only when the feature is enabled for the organization. Known values: member, maintainer |
site_admin | boolean | Required within parent | |
starred_at | string | Optional | |
starred_url | string | Required within parent | |
subscriptions_url | string | Required within parent | Format: uri |
type | string | Required within parent | |
url | string | Required within parent | Format: uri |
user_view_type | string | Optional |
List teams — response body — item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Groups of organization members that gives permissions on specified repositories. |
access_source | string | Optional | How the team's access to the repository was granted. This property is only present when the team is returned in a repository context, such as `GET /repos/{owner}/{repo}/teams`. Known values: direct, organization, enterprise |
description | JSON | Required within parent | |
description (anyOf 1) | string | Alternative | |
description (anyOf 2) | null | Alternative | |
enterprise_id | JSON | Optional | |
enterprise_id (anyOf 1) | integer | Alternative | Unique identifier of the enterprise to which this team belongs |
enterprise_id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
html_url | string | Required within parent | Format: uri |
id | JSON | Required within parent | |
id (anyOf 1) | integer | Alternative | |
id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
members_url | string | Required within parent | |
name | string | Required within parent | |
node_id | string | Required within parent | |
notification_setting | string | Optional | |
organization_id | JSON | Optional | |
organization_id (anyOf 1) | integer | Alternative | Unique identifier of the organization to which this team belongs |
organization_id (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
parent | Model | Required within parent | Expand Create a team — response body — parent |
permission | string | Required within parent | |
permissions | object | Optional | |
permissions.admin | boolean | Required within parent | |
permissions.maintain | boolean | Required within parent | |
permissions.pull | boolean | Required within parent | |
permissions.push | boolean | Required within parent | |
permissions.triage | boolean | Required within parent | |
privacy | string | Optional | |
repositories_url | string | Required within parent | Format: uri |
slug | string | Required within parent | |
type | string | Required within parent | The ownership type of the team Known values: enterprise, organization |
url | string | Required within parent | Format: uri |
Referenced models: Create a team — response body — parent