POST /orgs/{org}/repos
Creates a new repository in the specified organization. The authenticated user must be a member of the organization.
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
Path parameters
Name | Type | Required | Description |
---|---|---|---|
org |
String | Yes |
The organization name. 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 |
---|---|---|---|
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 |
Choose an open source license template that best suits your needs, and then use the license keyword as the |
merge_commit_message |
String | No |
The default value for a merge commit message.
Possible values:
|
has_wiki |
Boolean | No |
Either Default value: true |
merge_commit_title |
String | No |
Required when using The default value for a merge commit title.
Possible values:
|
is_template |
Boolean | No |
Either Default value: false |
auto_init |
Boolean | No |
Pass Default value: false |
allow_rebase_merge |
Boolean | No |
Either Default value: true |
has_projects |
Boolean | No |
Either Default value: true |
gitignore_template |
String | No |
Desired language or platform .gitignore template to apply. Use the name of the template without the extension. For example, "Haskell". |
use_squash_pr_title_as_default |
Boolean | No |
Either Default value: false |
squash_merge_commit_message |
String | No |
The default value for a squash merge commit message:
Possible values:
|
has_issues |
Boolean | No |
Either Default value: true |
squash_merge_commit_title |
String | No |
Required when using The default value for a squash merge commit title:
Possible values:
|
allow_squash_merge |
Boolean | No |
Either Default value: true |
delete_branch_on_merge |
Boolean | No |
Either Default value: false |
visibility |
String | No |
The visibility of the repository. Possible values:
|
homepage |
String | No |
A URL with more information about the repository. |
name |
String | Yes |
The name of the repository. |
allow_auto_merge |
Boolean | No |
Either Default value: false |
private |
Boolean | No |
Whether the repository is private. Default value: false |
allow_merge_commit |
Boolean | No |
Either Default value: true |
custom_properties |
Object | No |
The custom properties for the new repository. The keys are the custom property names, and the values are the corresponding custom property values. |
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.