POST/repos/{owner}/{repo}/transfer

Transfer a repository

A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original owner, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see about repository transfers.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters · 3 body fields
ownerstringrequired
The account owner of the repository. The name is not case sensitive.
repostringrequired
The name of the repository without the `.git` extension. The name is not case sensitive.
new_ownerstringrequired
The username or organization name the repository will be transferred to.
new_namestringoptional
The new name to be given to the repository.
team_idsarray<integer>optional
ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories.

1 status code
202Response
idintegerrequired
node_idstringrequired
namestringrequired
full_namestringrequired
ownerobjectrequired
A GitHub user.
privatebooleanrequired
html_urlstringrequired
descriptionstringrequired
forkbooleanrequired
urlstringrequired
archive_urlstringrequired
assignees_urlstringrequired
blobs_urlstringrequired
branches_urlstringrequired
collaborators_urlstringrequired
comments_urlstringrequired
commits_urlstringrequired
compare_urlstringrequired
contents_urlstringrequired
contributors_urlstringrequired
deployments_urlstringrequired
downloads_urlstringrequired
events_urlstringrequired
forks_urlstringrequired
git_commits_urlstringrequired
git_refs_urlstringrequired
git_tags_urlstringrequired
git_urlstringoptional
issue_comment_urlstringrequired
issue_events_urlstringrequired
issues_urlstringrequired
keys_urlstringrequired
labels_urlstringrequired
languages_urlstringrequired
merges_urlstringrequired
milestones_urlstringrequired
notifications_urlstringrequired
pulls_urlstringrequired
releases_urlstringrequired
ssh_urlstringoptional
stargazers_urlstringrequired
statuses_urlstringrequired
subscribers_urlstringrequired
subscription_urlstringrequired
tags_urlstringrequired
teams_urlstringrequired
trees_urlstringrequired
clone_urlstringoptional
mirror_urlstringoptional
hooks_urlstringrequired
svn_urlstringoptional
homepagestringoptional
languagestringoptional
forks_countintegeroptional
stargazers_countintegeroptional
watchers_countintegeroptional
sizeintegeroptional
The size of the repository, in kilobytes. Size is calculated hourly. When a repository is initially created, the size is 0.
default_branchstringoptional
open_issues_countintegeroptional
is_templatebooleanoptional
topicsarray<string>optional
has_issuesbooleanoptional
has_projectsbooleanoptional
has_wikibooleanoptional
has_pagesbooleanoptional
has_downloadsbooleanoptional
has_discussionsbooleanoptional
has_pull_requestsbooleanoptional
pull_request_creation_policystringoptional
The policy controlling who can create pull requests: all or collaborators_only.
Allowed:allcollaborators_only
archivedbooleanoptional
disabledbooleanoptional
visibilitystringoptional
pushed_atstringoptional
created_atstringoptional
updated_atstringoptional
permissionsobjectoptional
role_namestringoptional
temp_clone_tokenstringoptional
delete_branch_on_mergebooleanoptional
subscribers_countintegeroptional
network_countintegeroptional
code_of_conductobjectoptional
Code Of Conduct
licenseobjectoptional
forksintegeroptional
open_issuesintegeroptional
watchersintegeroptional
allow_forkingbooleanoptional
web_commit_signoff_requiredbooleanoptional
security_and_analysisobjectoptional
custom_propertiesobjectoptional
The custom properties that were defined for the repository. The keys are the custom property names, and the values are the corresponding custom property values.

Was this helpful?