Skip to main content

Create Repo Using Template

Creates a new repository using a repository template. Use the template_owner and template_repo route parameters to specify the repository to use as the template. The authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the Get a repository endpoint and check that the is_template key is true.

OAuth scope requirements

When using OAuth, authorizations must include:

  • public_repo scope or repo scope to create a public repository. Note: For GitHub AE, use repo scope to create an internal repository.
  • repo scope to create a private repository.
External Documentation

To learn more, visit the GitHub documentation.

Basic Parameters

DescriptionA short description of the new repository.
Include All BranchesSet to true to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: false.
New Repo NameThe name of the new repository.
New Repo OwnerThe organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization.
Template OwnerThe user who owns the template repo.
Template RepoThe name of the template repo.

Advanced Parameters

PrivateEither true to create a new private repository or false to create a new public one.

Example Output

"value": {
"allow_auto_merge": false,
"allow_rebase_merge": true,
"archive_url": "{archive_format}{/ref}",
"archived": false,
"assignees_url": "{/user}",
"blobs_url": "{/sha}",
"branches_url": "{/branch}",
"clone_url": "",
"collaborators_url": "{/collaborator}",
"comments_url": "{/number}",
"commits_url": "{/sha}",
"compare_url": "{base}...{head}",
"contents_url": "{+path}",
"contributors_url": "",
"created_at": "2011-01-26T19:01:12Z",
"default_branch": "master",
"deployments_url": "",
"description": "This your first repo!",
"disabled": false,
"downloads_url": "",
"events_url": "",
"fork": false,
"forks": 9,
"forks_count": 9,
"forks_url": "",
"full_name": "octocat/Hello-World",
"git_commits_url": "{/sha}",
"git_refs_url": "{/sha}",
"git_tags_url": "{/sha}",
"git_url": "",
"has_downloads": true,
"has_issues": true,
"has_pages": false,
"has_projects": true,
"has_wiki": true,
"homepage": "",
"hooks_url": "",
"html_url": "",
"id": 1296269,
"is_template": false,
"issue_comment_url": "{/number}",
"issue_events_url": "{/number}",
"issues_url": "{/number}",
"keys_url": "{/key_id}",
"labels_url": "{/name}",
"language": null,
"languages_url": "",
"license": {
"html_url": "",
"key": "mit",
"name": "MIT License",
"node_id": "MDc6TGljZW5zZW1pdA==",
"spdx_id": "MIT",
"url": ""
"merges_url": "",
"milestones_url": "{/number}",
"mirror_url": "",
"name": "Hello-World",
"node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
"notifications_url": "{?since,all,participating}",
"open_issues": 0,
"open_issues_count": 0,
"owner": {
"avatar_url": "",
"events_url": "{/privacy}",
"followers_url": "",
"following_url": "{/other_user}",
"gists_url": "{/gist_id}",
"gravatar_id": "",
"html_url": "",
"id": 1,
"login": "octocat",
"node_id": "MDQ6VXNlcjE=",
"organizations_url": "",
"received_events_url": "",
"repos_url": "",
"site_admin": false,
"starred_url": "{/owner}{/repo}",
"subscriptions_url": "",
"type": "User",
"url": ""
"permissions": {
"admin": false,
"pull": true,
"push": false
"private": false,
"pulls_url": "{/number}",
"pushed_at": "2011-01-26T19:06:43Z",
"releases_url": "{/id}",
"size": 108,
"ssh_url": "",
"stargazers_count": 80,
"stargazers_url": "",
"statuses_url": "{sha}",
"subscribers_url": "",
"subscription_url": "",
"svn_url": "",
"tags_url": "",
"teams_url": "",
"topics": [
"trees_url": "{/sha}",
"updated_at": "2011-01-26T19:14:43Z",
"url": "",
"visibility": "public",
"watchers": 80,
"watchers_count": 80

Automation Library Example

Create Repo Using Template with Github and Send Results Via Email

Automation LibraryPreview this Automation on desktop