Create an organization repository

POST {{baseUrl}}/orgs/:org/repos

Creates a new repository in the specified organization. The authenticated user must be a member of the organization.

OAuth scope requirements

When using OAuth, authorizations must include:

  • public_repo scope or repo scope to create a public repository
  • repo scope to create a private repository

Request Body

{"name"=>"<string>", "description"=>"<string>", "homepage"=>"<string>", "private"=>false, "visibility"=>"<string>", "has_issues"=>true, "has_projects"=>true, "has_wiki"=>true, "is_template"=>false, "team_id"=>"<integer>", "auto_init"=>false, "gitignore_template"=>"<string>", "license_template"=>"<string>", "allow_squash_merge"=>true, "allow_merge_commit"=>true, "allow_rebase_merge"=>true, "delete_branch_on_merge"=>false}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring

RESPONSES

status: Created

{&quot;id&quot;:1296269,&quot;node_id&quot;:&quot;MDEwOlJlcG9zaXRvcnkxMjk2MjY5&quot;,&quot;name&quot;:&quot;Hello-World&quot;,&quot;full_name&quot;:&quot;octocat/Hello-World&quot;,&quot;owner&quot;:{&quot;login&quot;:&quot;octocat&quot;,&quot;id&quot;:1,&quot;node_id&quot;:&quot;MDQ6VXNlcjE=&quot;,&quot;avatar_url&quot;:&quot;https://github.com/images/error/octocat_happy.gif&quot;,&quot;gravatar_id&quot;:&quot;&quot;,&quot;url&quot;:&quot;https://api.github.com/users/octocat&quot;,&quot;html_url&quot;:&quot;https://github.com/octocat&quot;,&quot;followers_url&quot;:&quot;https://api.github.com/users/octocat/followers&quot;,&quot;following_url&quot;:&quot;https://api.github.com/users/octocat/following{/other_user}&quot;,&quot;gists_url&quot;:&quot;https://api.github.com/users/octocat/gists{/gist_id}&quot;,&quot;starred_url&quot;:&quot;https://api.github.com/users/octocat/starred{/owner}{/repo}&quot;,&quot;subscriptions_url&quot;:&quot;https://api.github.com/users/octocat/subscriptions&quot;,&quot;organizations_url&quot;:&quot;https://api.github.com/users/octocat/orgs&quot;,&quot;repos_url&quot;:&quot;https://api.github.com/users/octocat/repos&quot;,&quot;events_url&quot;:&quot;https://api.github.com/users/octocat/events{/privacy}&quot;,&quot;received_events_url&quot;:&quot;https://api.github.com/users/octocat/received_events&quot;,&quot;type&quot;:&quot;User&quot;,&quot;site_admin&quot;:false},&quot;private&quot;:false,&quot;html_url&quot;:&quot;https://github.com/octocat/Hello-World&quot;,&quot;description&quot;:&quot;This your first repo!&quot;,&quot;fork&quot;:false,&quot;url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World&quot;,&quot;archive_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}&quot;,&quot;assignees_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/assignees{/user}&quot;,&quot;blobs_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}&quot;,&quot;branches_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/branches{/branch}&quot;,&quot;collaborators_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}&quot;,&quot;comments_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/comments{/number}&quot;,&quot;commits_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/commits{/sha}&quot;,&quot;compare_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}&quot;,&quot;contents_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/contents/{+path}&quot;,&quot;contributors_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/contributors&quot;,&quot;deployments_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/deployments&quot;,&quot;downloads_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/downloads&quot;,&quot;events_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/events&quot;,&quot;forks_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/forks&quot;,&quot;git_commits_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/git/commits{/sha}&quot;,&quot;git_refs_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/git/refs{/sha}&quot;,&quot;git_tags_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/git/tags{/sha}&quot;,&quot;git_url&quot;:&quot;git:github.com/octocat/Hello-World.git&quot;,&quot;issue_comment_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/issues/comments{/number}&quot;,&quot;issue_events_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/issues/events{/number}&quot;,&quot;issues_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/issues{/number}&quot;,&quot;keys_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/keys{/key_id}&quot;,&quot;labels_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/labels{/name}&quot;,&quot;languages_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/languages&quot;,&quot;merges_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/merges&quot;,&quot;milestones_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/milestones{/number}&quot;,&quot;notifications_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}&quot;,&quot;pulls_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/pulls{/number}&quot;,&quot;releases_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/releases{/id}&quot;,&quot;ssh_url&quot;:&quot;git@github.com:octocat/Hello-World.git&quot;,&quot;stargazers_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/stargazers&quot;,&quot;statuses_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/statuses/{sha}&quot;,&quot;subscribers_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/subscribers&quot;,&quot;subscription_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/subscription&quot;,&quot;tags_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/tags&quot;,&quot;teams_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/teams&quot;,&quot;trees_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/git/trees{/sha}&quot;,&quot;clone_url&quot;:&quot;https://github.com/octocat/Hello-World.git&quot;,&quot;mirror_url&quot;:&quot;git:git.example.com/octocat/Hello-World&quot;,&quot;hooks_url&quot;:&quot;https://api.github.com/repos/octocat/Hello-World/hooks&quot;,&quot;svn_url&quot;:&quot;https://svn.github.com/octocat/Hello-World&quot;,&quot;homepage&quot;:&quot;https://github.com&quot;,&quot;language&quot;:null,&quot;forks&quot;:9,&quot;forks_count&quot;:9,&quot;stargazers_count&quot;:80,&quot;watchers_count&quot;:80,&quot;watchers&quot;:80,&quot;size&quot;:108,&quot;default_branch&quot;:&quot;master&quot;,&quot;open_issues&quot;:0,&quot;open_issues_count&quot;:0,&quot;is_template&quot;:true,&quot;license&quot;:{&quot;key&quot;:&quot;mit&quot;,&quot;name&quot;:&quot;MIT License&quot;,&quot;url&quot;:&quot;https://api.github.com/licenses/mit&quot;,&quot;spdx_id&quot;:&quot;MIT&quot;,&quot;node_id&quot;:&quot;MDc6TGljZW5zZW1pdA==&quot;,&quot;html_url&quot;:&quot;https://api.github.com/licenses/mit&quot;},&quot;topics&quot;:[&quot;octocat&quot;,&quot;atom&quot;,&quot;electron&quot;,&quot;api&quot;],&quot;has_issues&quot;:true,&quot;has_projects&quot;:true,&quot;has_wiki&quot;:true,&quot;has_pages&quot;:false,&quot;has_downloads&quot;:true,&quot;archived&quot;:false,&quot;disabled&quot;:false,&quot;visibility&quot;:&quot;public&quot;,&quot;pushed_at&quot;:&quot;2011-01-26T19:06:43Z&quot;,&quot;created_at&quot;:&quot;2011-01-26T19:01:12Z&quot;,&quot;updated_at&quot;:&quot;2011-01-26T19:14:43Z&quot;,&quot;permissions&quot;:{&quot;admin&quot;:false,&quot;push&quot;:false,&quot;pull&quot;:true},&quot;allow_rebase_merge&quot;:true,&quot;template_repository&quot;:null,&quot;temp_clone_token&quot;:&quot;ABTLWHOULUVAXGTRYU7OC2876QJ2O&quot;,&quot;allow_squash_merge&quot;:true,&quot;delete_branch_on_merge&quot;:true,&quot;allow_merge_commit&quot;:true,&quot;subscribers_count&quot;:42,&quot;network_count&quot;:0}