Create a team
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://docs.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://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)".
/orgs/{org}/teams- Source
github-v3-rest.json- Revision
f5f067c1e6f6- Active snapshot
85e53e3d0d65
Request
Path Parameters
- org stringrequired
Body Params
requiredThe description of the team.
The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. LDAP synchronization must be enabled to map LDAP entries to a team. Use the "[Update LDAP mapping for a team](https://docs.github.com/[email protected]/rest/reference/enterprise-admin#update-ldap-mapping-for-a-team)" endpoint to change the LDAP DN. For more information, see "[Using LDAP](https://docs.github.com/[email protected]/admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/using-ldap#enabling-ldap-sync)."
List GitHub IDs for organization members who will become team maintainers.
The name of the team.
The ID of a team to set as the parent team.
**Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: \* `pull` - team members can pull, but not push to or administer newly-added repositories. \* `push` - team members can pull and push, but not administer newly-added repositories.
The level of privacy this team should have. The options are: **For a non-nested team:** \* `secret` - only visible to organization owners and members of this team. \* `closed` - visible to all members of this organization. Default: `secret` **For a parent or child team:** \* `closed` - visible to all members of this organization. Default for child team: `closed`
The full name (e.g., "organization-name/repository-name") of repositories to add the team to.
Responses
Response
Example: 2017-07-14T16:53:42Z
Example: A great team.
Example: https://github.com/orgs/rails/teams/core
Unique identifier of the team
Example: 42
Distinguished Name (DN) that team maps to within LDAP environment
Example: uid=example,ou=users,dc=github,dc=com
Example: 3
Example: https://api.github.com/organizations/1/team/1/members{/member}
Name of the team
Example: Developers
Example: MDQ6VGVhbTE=
organization Organization Full objectrequiredOrganization Full
Organization Full
Example: https://github.com/images/error/octocat_happy.gif
Example: [email protected]
Example: https://github.com/blog
Example: 8
Example: GitHub
Example: 2008-01-14T04:33:35Z
Example: A great organization
Example: 10000
Example: [email protected]
Example: https://api.github.com/orgs/github/events
Example: 20
Example: 0
Example: true
Example: true
Example: https://api.github.com/orgs/github/hooks
Example: https://github.com/octocat
Example: 1
Example: true
Example: https://api.github.com/orgs/github/issues
Example: San Francisco
Example: github
Example: all
Example: true
Example: true
Example: true
Example: true
Example: true
Example: true
Example: true
Example: false
Example: https://api.github.com/orgs/github/members{/member}
Example: github
Example: MDEyOk9yZ2FuaXphdGlvbjE=
Example: 100
plan objectoptional
Example: 81
Example: 1
Example: https://api.github.com/orgs/github/public_members{/member}
Example: 2
Example: https://api.github.com/orgs/github/repos
Example: 100
Example: github
Example: true
Example: Organization
Example: https://api.github.com/orgs/github
parent Team Simple objectoptionalnullable Groups of organization members that gives permissions on specified repositories.
Groups of organization members that gives permissions on specified repositories.
Description of the team
Example: A great team.
Example: https://github.com/orgs/rails/teams/core
Unique identifier of the team
Example: 1
Distinguished Name (DN) that team maps to within LDAP environment
Example: uid=example,ou=users,dc=github,dc=com
Example: https://api.github.com/organizations/1/team/1/members{/member}
Name of the team
Example: Justice League
Example: MDQ6VGVhbTE=
Permission that the team will have for its repositories
Example: admin
The level of privacy this team should have
Example: closed
Example: https://api.github.com/organizations/1/team/1/repos
Example: justice-league
URL for the team
Example: https://api.github.com/organizations/1/team/1
Permission that the team will have for its repositories
Example: push
The level of privacy this team should have
Example: closed
Example: 10
Example: https://api.github.com/organizations/1/team/1/repos
Example: justice-league
Example: 2017-08-17T12:37:15Z
URL for the team
Example: https://api.github.com/organizations/1/team/1
Forbidden
Validation failed