Skip to content

GitHub: Repos schemas (part 3)

21 GitHub schemas with complete fields and constraints.

← Repos operations · All schemas

List CODEOWNERS errors — response body

FieldTypePresenceDescription and constraints
$objectRootA list of errors found in a repo's CODEOWNERS file
errorsarrayRequired within parent
errors[]objectEach item
errors[].columnJSONRequired within parent
errors[].column (anyOf 1)integerAlternativeThe column number where this errors occurs.
errors[].column (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
errors[].kindstringRequired within parentThe type of error.
errors[].lineJSONRequired within parent
errors[].line (anyOf 1)integerAlternativeThe line number where this errors occurs.
errors[].line (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
errors[].messagestringRequired within parentA human-readable description of the error, combining information from multiple fields, laid out for display in a monospaced typeface (for example, a command-line setting).
errors[].pathstringRequired within parentThe path of the file where the error occured.
errors[].sourcestringOptionalThe contents of the line where the error occurs.
errors[].suggestionJSONOptional
errors[].suggestion (anyOf 1)stringAlternativeSuggested action to fix the error. This will usually be `null`, but is provided for some common errors.
errors[].suggestion (anyOf 2)nullAlternative

List branches for HEAD commit — response body — item

FieldTypePresenceDescription and constraints
$objectRootBranch Short
commitobjectRequired within parent
commit.shastringRequired within parent
commit.urlstringRequired within parent
namestringRequired within parent
protectedbooleanRequired within parent

List branches — response body — item

FieldTypePresenceDescription and constraints
$objectRootShort Branch
commitobjectRequired within parent
commit.shastringRequired within parent
commit.urlstringRequired within parentFormat: uri
namestringRequired within parent
protectedbooleanRequired within parent
protectionModelOptionalExpand Get branch protection — response body
protection_urlstringOptionalFormat: uri

Referenced models: Get branch protection — response body

List deliveries for a repository webhook — response body — item

FieldTypePresenceDescription and constraints
$objectRootDelivery made by a webhook, without request and response information.
actionJSONRequired within parent
action (anyOf 1)stringAlternativeThe type of activity for the event that triggered the delivery.
action (anyOf 2)nullAlternative
delivered_atstringRequired within parentTime when the webhook delivery occurred.
Format: date-time
durationJSONRequired within parent
duration (anyOf 1)numberAlternativeTime spent delivering.
duration (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
eventstringRequired within parentThe event that triggered the delivery.
guidstringRequired within parentUnique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event).
idJSONRequired within parent
id (anyOf 1)integerAlternativeUnique identifier of the webhook delivery.
Format: int64
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
installation_idJSONRequired within parent
installation_id (anyOf 1)JSONAlternative
installation_id (anyOf 1) (anyOf 1)integerAlternativeThe id of the GitHub App installation associated with this event.
Format: int64
installation_id (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
installation_id (anyOf 2)nullAlternative
redeliverybooleanRequired within parentWhether the webhook delivery is a redelivery.
repository_idJSONRequired within parent
repository_id (anyOf 1)JSONAlternative
repository_id (anyOf 1) (anyOf 1)integerAlternativeThe id of the repository associated with this event.
Format: int64
repository_id (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
repository_id (anyOf 2)nullAlternative
statusstringRequired within parentDescribes the response returned after attempting the delivery.
status_codeJSONRequired within parent
status_code (anyOf 1)integerAlternativeStatus code received when delivery was made.
status_code (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
throttled_atJSONOptional
throttled_at (anyOf 1)stringAlternativeTime when the webhook delivery was throttled.
Format: date-time
throttled_at (anyOf 2)nullAlternative

List repositories for the authenticated user — response body — item

FieldTypePresenceDescription and constraints
$objectRootA repository on GitHub.
allow_auto_mergebooleanOptionalWhether to allow Auto-merge to be used on pull requests.
Default: false
allow_forkingbooleanOptionalWhether to allow forking this repo
allow_merge_commitbooleanOptionalWhether to allow merge commits for pull requests.
Default: true
allow_rebase_mergebooleanOptionalWhether to allow rebase merges for pull requests.
Default: true
allow_squash_mergebooleanOptionalWhether to allow squash merges for pull requests.
Default: true
allow_update_branchbooleanOptionalWhether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging.
Default: false
anonymous_access_enabledbooleanOptionalWhether anonymous git access is enabled for this repository
archive_urlstringRequired within parent
archivedbooleanRequired within parentWhether the repository is archived.
Default: false
assignees_urlstringRequired within parent
blobs_urlstringRequired within parent
branches_urlstringRequired within parent
clone_urlstringRequired within parent
code_search_index_statusobjectOptionalThe status of the code search index for this repository
code_search_index_status.lexical_commit_shastringOptional
code_search_index_status.lexical_search_okbooleanOptional
collaborators_urlstringRequired within parent
comments_urlstringRequired within parent
commits_urlstringRequired within parent
compare_urlstringRequired within parent
contents_urlstringRequired within parent
contributors_urlstringRequired within parentFormat: uri
created_atJSONRequired within parent
created_at (anyOf 1)stringAlternativeFormat: date-time
created_at (anyOf 2)nullAlternative
default_branchstringRequired within parentThe default branch of the repository.
delete_branch_on_mergebooleanOptionalWhether to delete head branches when pull requests are merged
Default: false
deployments_urlstringRequired within parentFormat: uri
descriptionJSONRequired within parent
description (anyOf 1)stringAlternative
description (anyOf 2)nullAlternative
disabledbooleanRequired within parentReturns whether or not this repository disabled.
downloads_urlstringRequired within parentFormat: uri
events_urlstringRequired within parentFormat: uri
forkbooleanRequired within parent
forksJSONRequired within parent
forks (anyOf 1)integerAlternative
forks (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
forks_countJSONRequired within parent
forks_count (anyOf 1)integerAlternative
forks_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
forks_urlstringRequired within parentFormat: uri
full_namestringRequired within parent
git_commits_urlstringRequired within parent
git_refs_urlstringRequired within parent
git_tags_urlstringRequired within parent
git_urlstringRequired within parent
has_discussionsbooleanOptionalWhether discussions are enabled.
Default: false
has_issuesbooleanRequired within parentWhether issues are enabled.
Default: true
has_pagesbooleanRequired within parent
has_projectsbooleanRequired within parentWhether projects are enabled.
Default: true
has_pull_requestsbooleanOptionalWhether pull requests are enabled.
Default: true
has_wikibooleanRequired within parentWhether the wiki is enabled.
Default: true
homepageJSONRequired within parent
homepage (anyOf 1)stringAlternativeFormat: uri
homepage (anyOf 2)nullAlternative
hooks_urlstringRequired within parentFormat: uri
html_urlstringRequired within parentFormat: uri
idJSONRequired within parent
id (anyOf 1)integerAlternativeUnique identifier of the repository
Format: int64
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
is_templatebooleanOptionalWhether this repository acts as a template that can be used to generate new repositories.
Default: false
issue_comment_urlstringRequired within parent
issue_events_urlstringRequired within parent
issues_urlstringRequired within parent
keys_urlstringRequired within parent
labels_urlstringRequired within parent
languageJSONRequired within parent
language (anyOf 1)stringAlternative
language (anyOf 2)nullAlternative
languages_urlstringRequired within parentFormat: uri
licenseModelRequired within parentExpand Create a fork — response body — license
merge_commit_messagestringOptionalThe default value for a merge commit message.

- `PR_TITLE` - default to the pull request's title.
- `PR_BODY` - default to the pull request's body.
- `BLANK` - default to a blank commit message.
Known values: PR_BODY, PR_TITLE, BLANK
merge_commit_titlestringOptionalThe default value for a merge commit title.

- `PR_TITLE` - default to the pull request's title.
- `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name).
Known values: PR_TITLE, MERGE_MESSAGE
merges_urlstringRequired within parentFormat: uri
milestones_urlstringRequired within parent
mirror_urlJSONRequired within parent
mirror_url (anyOf 1)stringAlternativeFormat: uri
mirror_url (anyOf 2)nullAlternative
namestringRequired within parentThe name of the repository.
node_idstringRequired within parent
notifications_urlstringRequired within parent
open_issuesJSONRequired within parent
open_issues (anyOf 1)integerAlternative
open_issues (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
open_issues_countJSONRequired within parent
open_issues_count (anyOf 1)integerAlternative
open_issues_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
ownerModelRequired within parentExpand List users — response body — item
permissionsobjectOptional
permissions.adminbooleanRequired within parent
permissions.maintainbooleanOptional
permissions.pullbooleanRequired within parent
permissions.pushbooleanRequired within parent
permissions.triagebooleanOptional
privatebooleanRequired within parentWhether the repository is private or public.
Default: false
pull_request_creation_policystringOptionalThe policy controlling who can create pull requests: all or collaborators_only.
Known values: all, collaborators_only
pulls_urlstringRequired within parent
pushed_atJSONRequired within parent
pushed_at (anyOf 1)stringAlternativeFormat: date-time
pushed_at (anyOf 2)nullAlternative
releases_urlstringRequired within parent
sizeJSONRequired within parent
size (anyOf 1)integerAlternativeThe size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0.
size (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
squash_merge_commit_messagestringOptionalThe default value for a squash merge commit message:

- `PR_BODY` - default to the pull request's body.
- `COMMIT_MESSAGES` - default to the branch's commit messages.
- `BLANK` - default to a blank commit message.
Known values: PR_BODY, COMMIT_MESSAGES, BLANK
squash_merge_commit_titlestringOptionalThe default value for a squash merge commit title:

- `PR_TITLE` - default to the pull request's title.
- `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit).
Known values: PR_TITLE, COMMIT_OR_PR_TITLE
ssh_urlstringRequired within parent
stargazers_countJSONRequired within parent
stargazers_count (anyOf 1)integerAlternative
stargazers_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
stargazers_urlstringRequired within parentFormat: uri
starred_atstringOptional
statuses_urlstringRequired within parent
subscribers_urlstringRequired within parentFormat: uri
subscription_urlstringRequired within parentFormat: uri
svn_urlstringRequired within parentFormat: uri
tags_urlstringRequired within parentFormat: uri
teams_urlstringRequired within parentFormat: uri
temp_clone_tokenstringOptionalWhen 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.
topicsarrayOptional
topics[]stringEach item
trees_urlstringRequired within parent
updated_atJSONRequired within parent
updated_at (anyOf 1)stringAlternativeFormat: date-time
updated_at (anyOf 2)nullAlternative
urlstringRequired within parentFormat: uri
visibilitystringOptionalThe repository visibility: public, private, or internal.
Default: public
watchersJSONRequired within parent
watchers (anyOf 1)integerAlternative
watchers (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
watchers_countJSONRequired within parent
watchers_count (anyOf 1)integerAlternative
watchers_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
web_commit_signoff_requiredbooleanOptionalWhether to require contributors to sign off on web-based commits
Default: false

Referenced models: Create a fork — response body — license, List users — response body — item

List repository activities — response body — item

FieldTypePresenceDescription and constraints
$objectRootActivity
activity_typestringRequired within parentThe type of the activity that was performed.
Known values: push, force_push, branch_deletion, branch_creation, pr_merge, merge_queue_merge
actorModelRequired within parentExpand Get an issue — response body — user
afterstringRequired within parentThe SHA of the commit after the activity.
beforestringRequired within parentThe SHA of the commit before the activity.
idJSONRequired within parent
id (anyOf 1)integerAlternative
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
node_idstringRequired within parent
refstringRequired within parentThe full Git reference, formatted as `refs/heads/<branch name>`.
timestampstringRequired within parentThe time when the activity occurred.
Format: date-time

Referenced models: Get an issue — response body — user

List repository collaborators — response body — item

FieldTypePresenceDescription and constraints
$objectRootCollaborator
avatar_urlstringRequired within parentFormat: uri
emailJSONOptional
email (anyOf 1)stringAlternative
email (anyOf 2)nullAlternative
events_urlstringRequired within parent
followers_urlstringRequired within parentFormat: uri
following_urlstringRequired within parent
gists_urlstringRequired within parent
gravatar_idJSONRequired within parent
gravatar_id (anyOf 1)stringAlternative
gravatar_id (anyOf 2)nullAlternative
html_urlstringRequired within parentFormat: uri
idJSONRequired within parent
id (anyOf 1)integerAlternativeFormat: int64
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
loginstringRequired within parent
nameJSONOptional
name (anyOf 1)stringAlternative
name (anyOf 2)nullAlternative
node_idstringRequired within parent
organizations_urlstringRequired within parentFormat: uri
permissionsobjectOptional
permissions.adminbooleanRequired within parent
permissions.maintainbooleanOptional
permissions.pullbooleanRequired within parent
permissions.pushbooleanRequired within parent
permissions.triagebooleanOptional
received_events_urlstringRequired within parentFormat: uri
repos_urlstringRequired within parentFormat: uri
role_namestringRequired within parent
site_adminbooleanRequired within parent
starred_urlstringRequired within parent
subscriptions_urlstringRequired within parentFormat: uri
typestringRequired within parent
urlstringRequired within parentFormat: uri
user_view_typestringOptional

List repository contributors — response body — array item

FieldTypePresenceDescription and constraints
$objectRootContributor
avatar_urlstringOptionalFormat: uri
contributionsJSONRequired within parent
contributions (anyOf 1)integerAlternative
contributions (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
emailstringOptional
events_urlstringOptional
followers_urlstringOptionalFormat: uri
following_urlstringOptional
gists_urlstringOptional
gravatar_idJSONOptional
gravatar_id (anyOf 1)stringAlternative
gravatar_id (anyOf 2)nullAlternative
html_urlstringOptionalFormat: uri
idJSONOptional
id (anyOf 1)integerAlternative
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
loginstringOptional
namestringOptional
node_idstringOptional
organizations_urlstringOptionalFormat: uri
received_events_urlstringOptionalFormat: uri
repos_urlstringOptionalFormat: uri
site_adminbooleanOptional
starred_urlstringOptional
subscriptions_urlstringOptionalFormat: uri
typestringRequired within parent
urlstringOptionalFormat: uri
user_view_typestringOptional

List repository languages — response body

FieldTypePresenceDescription and constraints
$objectRootLanguage
Additional keys: see wildcard field
$.*JSONAdditional keys
$.* (anyOf 1)integerAlternative
$.* (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

List repository rule suites — response body

FieldTypePresenceDescription and constraints
$arrayRootResponse
$[]objectEach item
$[].actor_idJSONOptional
$[].actor_id (anyOf 1)integerAlternativeThe number that identifies the user.
$[].actor_id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
$[].actor_namestringOptionalThe handle for the GitHub user account.
$[].after_shastringOptionalThe last commit sha in the push evaluation.
$[].before_shastringOptionalThe first commit sha before the push evaluation.
$[].evaluation_resultstringOptionalThe result of the rule evaluations for rules with the `active` and `evaluate` enforcement statuses, demonstrating whether rules would pass or fail if all rules in the rule suite were `active`.
Known values: pass, fail, bypass
$[].idJSONOptional
$[].id (anyOf 1)integerAlternativeThe unique identifier of the rule insight.
$[].id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
$[].pushed_atstringOptionalFormat: date-time
$[].refstringOptionalThe ref name that the evaluation ran on.
$[].repository_idJSONOptional
$[].repository_id (anyOf 1)integerAlternativeThe ID of the repository associated with the rule evaluation.
$[].repository_id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
$[].repository_namestringOptionalThe name of the repository without the `.git` extension.
$[].resultstringOptionalThe result of the rule evaluations for rules with the `active` enforcement status.
Known values: pass, fail, bypass

List repository tags — response body — item

FieldTypePresenceDescription and constraints
$objectRootTag
commitobjectRequired within parent
commit.shastringRequired within parent
commit.urlstringRequired within parentFormat: uri
namestringRequired within parent
node_idstringRequired within parent
tarball_urlstringRequired within parentFormat: uri
zipball_urlstringRequired within parentFormat: uri

Request a Git Hub Pages build — response body

FieldTypePresenceDescription and constraints
$objectRootPage Build Status
statusstringRequired within parent
urlstringRequired within parentFormat: uri

Sync a fork branch with the upstream repository — response body

FieldTypePresenceDescription and constraints
$objectRootResults of a successful merge upstream request
base_branchstringOptional
merge_typestringOptionalKnown values: merge, fast-forward, none
messagestringOptional

Transfer a repository — response body

FieldTypePresenceDescription and constraints
$objectRootMinimal Repository
allow_forkingbooleanOptional
archive_urlstringRequired within parent
archivedbooleanOptional
assignees_urlstringRequired within parent
blobs_urlstringRequired within parent
branches_urlstringRequired within parent
clone_urlstringOptional
code_of_conductModelOptionalExpand Get a code of conduct — response body
collaborators_urlstringRequired within parent
comments_urlstringRequired within parent
commits_urlstringRequired within parent
compare_urlstringRequired within parent
contents_urlstringRequired within parent
contributors_urlstringRequired within parentFormat: uri
created_atJSONOptional
created_at (anyOf 1)stringAlternativeFormat: date-time
created_at (anyOf 2)nullAlternative
custom_propertiesobjectOptionalThe custom properties that were defined for the repository. The keys are the custom property names, and the values are the corresponding custom property values.
Additional keys: allowed
default_branchstringOptional
delete_branch_on_mergebooleanOptional
deployments_urlstringRequired within parentFormat: uri
descriptionJSONRequired within parent
description (anyOf 1)stringAlternative
description (anyOf 2)nullAlternative
disabledbooleanOptional
downloads_urlstringRequired within parentFormat: uri
events_urlstringRequired within parentFormat: uri
forkbooleanRequired within parent
forksJSONOptional
forks (anyOf 1)integerAlternative
forks (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
forks_countJSONOptional
forks_count (anyOf 1)integerAlternative
forks_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
forks_urlstringRequired within parentFormat: uri
full_namestringRequired within parent
git_commits_urlstringRequired within parent
git_refs_urlstringRequired within parent
git_tags_urlstringRequired within parent
git_urlstringOptional
has_discussionsbooleanOptional
has_issuesbooleanOptional
has_pagesbooleanOptional
has_projectsbooleanOptional
has_pull_requestsbooleanOptional
has_wikibooleanOptional
homepageJSONOptional
homepage (anyOf 1)stringAlternative
homepage (anyOf 2)nullAlternative
hooks_urlstringRequired within parentFormat: uri
html_urlstringRequired within parentFormat: uri
idJSONRequired within parent
id (anyOf 1)integerAlternativeFormat: int64
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
is_templatebooleanOptional
issue_comment_urlstringRequired within parent
issue_events_urlstringRequired within parent
issues_urlstringRequired within parent
keys_urlstringRequired within parent
labels_urlstringRequired within parent
languageJSONOptional
language (anyOf 1)stringAlternative
language (anyOf 2)nullAlternative
languages_urlstringRequired within parentFormat: uri
licenseJSONOptional
license (anyOf 1)objectAlternative
license (anyOf 1).keystringOptional
license (anyOf 1).namestringOptional
license (anyOf 1).node_idstringOptional
license (anyOf 1).spdx_idstringOptional
license (anyOf 1).urlJSONOptional
license (anyOf 1).url (anyOf 1)stringAlternative
license (anyOf 1).url (anyOf 2)nullAlternative
license (anyOf 2)nullAlternative
merges_urlstringRequired within parentFormat: uri
milestones_urlstringRequired within parent
mirror_urlJSONOptional
mirror_url (anyOf 1)stringAlternative
mirror_url (anyOf 2)nullAlternative
namestringRequired within parent
network_countJSONOptional
network_count (anyOf 1)integerAlternative
network_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
node_idstringRequired within parent
notifications_urlstringRequired within parent
open_issuesJSONOptional
open_issues (anyOf 1)integerAlternative
open_issues (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
open_issues_countJSONOptional
open_issues_count (anyOf 1)integerAlternative
open_issues_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
ownerModelRequired within parentExpand List users — response body — item
permissionsobjectOptional
permissions.adminbooleanOptional
permissions.maintainbooleanOptional
permissions.pullbooleanOptional
permissions.pushbooleanOptional
permissions.triagebooleanOptional
privatebooleanRequired within parent
pull_request_creation_policystringOptionalThe policy controlling who can create pull requests: all or collaborators_only.
Known values: all, collaborators_only
pulls_urlstringRequired within parent
pushed_atJSONOptional
pushed_at (anyOf 1)stringAlternativeFormat: date-time
pushed_at (anyOf 2)nullAlternative
releases_urlstringRequired within parent
role_namestringOptional
security_and_analysisModelOptionalExpand Create a fork — response body — security and analysis
sizeJSONOptional
size (anyOf 1)integerAlternativeThe size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0.
size (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
ssh_urlstringOptional
stargazers_countJSONOptional
stargazers_count (anyOf 1)integerAlternative
stargazers_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
stargazers_urlstringRequired within parentFormat: uri
statuses_urlstringRequired within parent
subscribers_countJSONOptional
subscribers_count (anyOf 1)integerAlternative
subscribers_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
subscribers_urlstringRequired within parentFormat: uri
subscription_urlstringRequired within parentFormat: uri
svn_urlstringOptional
tags_urlstringRequired within parentFormat: uri
teams_urlstringRequired within parentFormat: uri
temp_clone_tokenstringOptionalWhen 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.
topicsarrayOptional
topics[]stringEach item
trees_urlstringRequired within parent
updated_atJSONOptional
updated_at (anyOf 1)stringAlternativeFormat: date-time
updated_at (anyOf 2)nullAlternative
urlstringRequired within parentFormat: uri
visibilitystringOptional
watchersJSONOptional
watchers (anyOf 1)integerAlternative
watchers (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
watchers_countJSONOptional
watchers_count (anyOf 1)integerAlternative
watchers_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
web_commit_signoff_requiredbooleanOptional

Referenced models: Get a code of conduct — response body, Create a fork — response body — security and analysis, List users — response body — item

Update a deployment branch policy — request body — body

FieldTypePresenceDescription and constraints
$objectRoot
namestringRequired within parentThe name pattern that branches must match in order to deploy to the environment.

Wildcard characters will not match `/`. For example, to match branches that begin with `release/` and contain an additional single slash, use `release/*/*`.
For more information about pattern matching syntax, see the [Ruby File.fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch).

Update a repository invitation — response body

FieldTypePresenceDescription and constraints
$objectRootRepository invitations let you manage who you collaborate with.
created_atstringRequired within parentFormat: date-time
expiredbooleanOptionalWhether or not the invitation has expired
html_urlstringRequired within parent
idJSONRequired within parent
id (anyOf 1)integerAlternativeUnique identifier of the repository invitation.
Format: int64
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
inviteeModelRequired within parentExpand Get an issue — response body — user
inviterModelRequired within parentExpand Get an issue — response body — user
node_idstringRequired within parent
permissionsstringRequired within parentThe permission associated with the invitation.
Known values: read, write, admin, triage, triage_plus, maintain
repositoryModelRequired within parentExpand Transfer a repository — response body
urlstringRequired within parentURL for the repository invitation

Referenced models: Transfer a repository — response body, Get an issue — response body — user

Update a repository webhook — request body — body config

FieldTypePresenceDescription and constraints
$objectRootConfiguration object of the webhook
content_typestringOptionalThe media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`.
insecure_sslModelOptionalExpand Update a webhook configuration for a repository — request body — body insecure ssl
secretstringOptionalIf provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/webhooks/event-payloads/#delivery-headers).
urlstringOptionalThe URL to which the payloads will be delivered.
Format: uri

Referenced models: Update a webhook configuration for a repository — request body — body insecure ssl

Update a webhook configuration for a repository — request body — body insecure ssl

FieldTypePresenceDescription and constraints
$JSONRoot
$ (oneOf 1)stringAlternativeDetermines whether the SSL certificate of the host for `url` will be verified when delivering payloads. Supported values include `0` (verification is performed) and `1` (verification is not performed). The default is `0`. **We strongly recommend not setting this to `1` as you are subject to man-in-the-middle and other attacks.**
$ (oneOf 2)numberAlternative

Update branch protection — response body

FieldTypePresenceDescription and constraints
$objectRootBranch protections protect branches
allow_deletionsobjectOptionalAdditional keys: not allowed
allow_deletions.enabledbooleanRequired within parent
allow_force_pushesobjectOptionalAdditional keys: not allowed
allow_force_pushes.enabledbooleanRequired within parent
allow_fork_syncingobjectOptionalWhether users can pull changes from upstream when the branch is locked. Set to `true` to allow fork syncing. Set to `false` to prevent fork syncing.
Additional keys: not allowed
allow_fork_syncing.enabledbooleanOptionalDefault: false
block_creationsobjectOptionalAdditional keys: not allowed
block_creations.enabledbooleanRequired within parent
enforce_adminsobjectOptionalAdditional keys: not allowed
enforce_admins.enabledbooleanRequired within parent
enforce_admins.urlstringRequired within parentFormat: uri
lock_branchobjectOptionalWhether to set the branch as read-only. If this is true, users will not be able to push to the branch.
Additional keys: not allowed
lock_branch.enabledbooleanOptionalDefault: false
required_conversation_resolutionobjectOptionalAdditional keys: not allowed
required_conversation_resolution.enabledbooleanOptional
required_linear_historyobjectOptionalAdditional keys: not allowed
required_linear_history.enabledbooleanRequired within parent
required_pull_request_reviewsobjectOptional
required_pull_request_reviews.bypass_pull_request_allowancesobjectOptional
required_pull_request_reviews.bypass_pull_request_allowances.appsarrayOptional
required_pull_request_reviews.bypass_pull_request_allowances.apps[]ModelEach itemExpand Get an app — response body
required_pull_request_reviews.bypass_pull_request_allowances.teamsarrayRequired within parent
required_pull_request_reviews.bypass_pull_request_allowances.teams[]ModelEach itemExpand List teams — response body — item
required_pull_request_reviews.bypass_pull_request_allowances.usersarrayRequired within parent
required_pull_request_reviews.bypass_pull_request_allowances.users[]ModelEach itemExpand List users — response body — item
required_pull_request_reviews.dismiss_stale_reviewsbooleanOptional
required_pull_request_reviews.dismissal_restrictionsobjectOptional
required_pull_request_reviews.dismissal_restrictions.appsarrayOptional
required_pull_request_reviews.dismissal_restrictions.apps[]ModelEach itemExpand Get an app — response body
required_pull_request_reviews.dismissal_restrictions.teamsarrayRequired within parent
required_pull_request_reviews.dismissal_restrictions.teams[]ModelEach itemExpand List teams — response body — item
required_pull_request_reviews.dismissal_restrictions.teams_urlstringRequired within parentFormat: uri
required_pull_request_reviews.dismissal_restrictions.urlstringRequired within parentFormat: uri
required_pull_request_reviews.dismissal_restrictions.usersarrayRequired within parent
required_pull_request_reviews.dismissal_restrictions.users[]ModelEach itemExpand List users — response body — item
required_pull_request_reviews.dismissal_restrictions.users_urlstringRequired within parentFormat: uri
required_pull_request_reviews.require_code_owner_reviewsbooleanOptional
required_pull_request_reviews.require_last_push_approvalbooleanOptionalWhether the most recent push must be approved by someone other than the person who pushed it.
Default: false
required_pull_request_reviews.required_approving_review_countJSONOptional
required_pull_request_reviews.required_approving_review_count (anyOf 1)integerAlternative
required_pull_request_reviews.required_approving_review_count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
required_pull_request_reviews.urlstringRequired within parentFormat: uri
required_signaturesobjectOptional
required_signatures.enabledbooleanRequired within parent
required_signatures.urlstringRequired within parentFormat: uri
required_status_checksModelOptionalExpand Get status checks protection — response body
restrictionsModelOptionalExpand Get access restrictions — response body
urlstringRequired within parentFormat: uri

Referenced models: Get access restrictions — response body, Get an app — response body, List users — response body — item, Get status checks protection — response body, List teams — response body — item

Update pull request review protection — request body — body bypass pull request allowances

FieldTypePresenceDescription and constraints
$objectRootAllow specific users, teams, or apps to bypass pull request requirements.
appsarrayOptionalThe list of app `slug`s allowed to bypass pull request requirements.
apps[]stringEach item
teamsarrayOptionalThe list of team `slug`s allowed to bypass pull request requirements.
teams[]stringEach item
usersarrayOptionalThe list of user `login`s allowed to bypass pull request requirements.
users[]stringEach item

Update pull request review protection — request body — body dismissal restrictions

FieldTypePresenceDescription and constraints
$objectRootSpecify which users, teams, and apps can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories.
appsarrayOptionalThe list of app `slug`s with dismissal access
apps[]stringEach item
teamsarrayOptionalThe list of team `slug`s with dismissal access
teams[]stringEach item
usersarrayOptionalThe list of user `login`s with dismissal access
users[]stringEach item

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.