Create a team
POST {{baseUrl}}/orgs/:org/teams
To create a team, the authenticated user must be a member or owner of {org}
. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see [Setting team creation permissions](https://help.github.com/en/articles/setting-team-creation-permissions-in-your-organization).
When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of maintainers
. For more information, see [About teams](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)
.
Request Body
{"name"=>"<string>", "description"=>"<string>", "maintainers"=>["<string>", "<string>"], "repo_names"=>["<string>", "<string>"], "privacy"=>"<string>", "permission"=>"pull", "parent_team_id"=>"<integer>"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: Created
{"id":1,"node_id":"MDQ6VGVhbTE=","url":"https://api.github.com/teams/1","html_url":"https://api.github.com/teams/justice-league","name":"Justice League","slug":"justice-league","description":"A great team.","privacy":"closed","permission":"admin","members_url":"https://api.github.com/teams/1/members{/member}","repositories_url":"https://api.github.com/teams/1/repos","parent":null,"members_count":3,"repos_count":10,"created_at":"2017-07-14T16:53:42Z","updated_at":"2017-08-17T12:37:15Z","organization":{"login":"github","id":1,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE=","url":"https://api.github.com/orgs/github","repos_url":"https://api.github.com/orgs/github/repos","events_url":"https://api.github.com/orgs/github/events","hooks_url":"https://api.github.com/orgs/github/hooks","issues_url":"https://api.github.com/orgs/github/issues","members_url":"https://api.github.com/orgs/github/members{/member}","public_members_url":"https://api.github.com/orgs/github/public_members{/member}","avatar_url":"https://github.com/images/error/octocat_happy.gif","description":"A great organization","name":"github","company":"GitHub","blog":"https://github.com/blog","location":"San Francisco","email":"octocat@github.com","is_verified":true,"has_organization_projects":true,"has_repository_projects":true,"public_repos":2,"public_gists":1,"followers":20,"following":0,"html_url":"https://github.com/octocat","created_at":"2008-01-14T04:33:35Z","updated_at":"2017-08-17T12:37:15Z","type":"Organization"}}