POST /repos/{template_owner}/{template_repo}/generate

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. If the repository is not public, 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 app tokens and personal access tokens (classic) need the public_repo or repo scope to create a public repository, and repo scope to create a private repository.

Servers

Path parameters

Name Type Required Description
template_repo String Yes

The name of the template repository without the .git extension. The name is not case sensitive.

template_owner String Yes

The account owner of the template repository. The name is not case sensitive.

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
name String Yes

The name of the new repository.

description String No

A short description of the new repository.

include_all_branches Boolean No

Set to true to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: false.

Default value: false

private Boolean No

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

Default value: false

owner String No

The 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.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.