POST /user/repos
Creates a new repository for the authenticated user.
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
- https://api.github.com
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 |
---|---|---|---|
has_discussions |
Boolean | No |
Whether discussions are enabled. Default value: false |
description |
String | No |
A short description of the repository. |
team_id |
Integer | No |
The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. |
license_template |
String | No |
The license keyword of the open source license for this repository. |
squash_merge_commit_message |
String | No |
The default value for a squash merge commit message:
Possible values:
|
has_issues |
Boolean | No |
Whether issues are enabled. Default value: true |
merge_commit_message |
String | No |
The default value for a merge commit message.
Possible values:
|
squash_merge_commit_title |
String | No |
Required when using The default value for a squash merge commit title:
Possible values:
|
has_wiki |
Boolean | No |
Whether the wiki is enabled. Default value: true |
allow_squash_merge |
Boolean | No |
Whether to allow squash merges for pull requests. Default value: true |
delete_branch_on_merge |
Boolean | No |
Whether to delete head branches when pull requests are merged Default value: false |
merge_commit_title |
String | No |
Required when using The default value for a merge commit title.
Possible values:
|
is_template |
Boolean | No |
Whether this repository acts as a template that can be used to generate new repositories. Default value: false |
homepage |
String | No |
A URL with more information about the repository. |
name |
String | Yes |
The name of the repository. |
auto_init |
Boolean | No |
Whether the repository is initialized with a minimal README. Default value: false |
allow_rebase_merge |
Boolean | No |
Whether to allow rebase merges for pull requests. Default value: true |
allow_auto_merge |
Boolean | No |
Whether to allow Auto-merge to be used on pull requests. Default value: false |
private |
Boolean | No |
Whether the repository is private. Default value: false |
has_projects |
Boolean | No |
Whether projects are enabled. Default value: true |
gitignore_template |
String | No |
The desired language or platform to apply to the .gitignore. |
allow_merge_commit |
Boolean | No |
Whether to allow merge commits for pull requests. Default value: true |
has_downloads |
Boolean | No |
Whether downloads are enabled. Default value: true |
How to start integrating
- Add HTTP Task to your workflow definition.
- 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.
- Click Test request to test run your request to the API and see the API's response.