apicheats.dev Cheat sheet Raw .md
POST

Try POST /user/repos — GitHub API

GitHub playground

Create a repository for the authenticated user

Credentials

Kept in this tab only. Requests go through apicheats.dev's same-origin proxy straight to api.github.com; the proxy stores and logs nothing about them.

Headers

Body application/json

23 body fields
  • name · required · string — The name of the repository.
  • description · optional · string — A short description of the repository.
  • homepage · optional · string — A URL with more information about the repository.
  • private · optional · boolean — Whether the repository is private.
  • has_issues · optional · boolean — Whether issues are enabled.
  • has_projects · optional · boolean — Whether projects are enabled.
  • has_wiki · optional · boolean — Whether the wiki is enabled.
  • has_discussions · optional · boolean — Whether discussions are enabled.
  • team_id · optional · integer — The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization.
  • auto_init · optional · boolean — Whether the repository is initialized with a minimal README.
  • gitignore_template · optional · string — The desired language or platform to apply to the .gitignore.
  • license_template · optional · string — The license keyword of the open source license for this repository.
  • allow_squash_merge · optional · boolean — Whether to allow squash merges for pull requests.
  • allow_merge_commit · optional · boolean — Whether to allow merge commits for pull requests.
  • allow_rebase_merge · optional · boolean — Whether to allow rebase merges for pull requests.
  • allow_auto_merge · optional · boolean — Whether to allow Auto-merge to be used on pull requests.
  • delete_branch_on_merge · optional · boolean — Whether to delete head branches when pull requests are merged
  • squash_merge_commit_title · optional · string — Required when using `squash_merge_commit_message`. The default value for a squash merge commit title: - `PR_TITLE` - default to the pull request's title. - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit).
  • squash_merge_commit_message · optional · string — The default value for a squash merge commit message: - `PR_BODY` - default to the pull request's body. - `COMMIT_MESSAGES` - default to the branch's commit messages. - `BLANK` - default to a blank commit message.
  • merge_commit_title · optional · string — Required when using `merge_commit_message`. The default value for a merge commit title. - `PR_TITLE` - default to the pull request's title. - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name).
  • merge_commit_message · optional · string — The default value for a merge commit message. - `PR_TITLE` - default to the pull request's title. - `PR_BODY` - default to the pull request's body. - `BLANK` - default to a blank commit message.
  • has_downloads · optional · boolean — Whether downloads are enabled.
  • is_template · optional · boolean — Whether this repository acts as a template that can be used to generate new repositories.