POST
/orgs/{org}/teamsCreate 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."
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".
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
orgstringrequired
The organization name. The name is not case sensitive.
namestringrequired
The name of the team.
descriptionstringoptional
The description of the team.
maintainersarray<string>optional
List GitHub usernames for organization members who will become team maintainers.
repo_namesarray<string>optional
The full name (e.g., "organization-name/repository-name") of repositories to add the team to.
privacystringoptional
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`
notification_settingstringoptional
The notification setting the team has chosen. The options are:
* `notifications_enabled` - team members receive notifications when the team is @mentioned.
* `notifications_disabled` - no one receives notifications.
Default: `notifications_enabled`
permissionstringoptional
**Closing down notice**. The permission that new repositories will be added to the team with when none is specified.
parent_team_idintegeroptional
The ID of a team to set as the parent team.
parent_team_slugstringoptional
The slug of a team to set as the parent team. Ignored when `parent_team_id` is also provided.
201Response
idintegerrequired
Unique identifier of the team
node_idstringrequired
urlstringrequired
URL for the team
html_urlstringrequired
namestringrequired
Name of the team
slugstringrequired
descriptionstringrequired
privacystringoptional
The level of privacy this team should have
notification_settingstringoptional
The notification setting the team has set
permissionstringrequired
Permission that the team will have for its repositories
members_urlstringrequired
repositories_urlstringrequired
parentobjectoptional
Groups of organization members that gives permissions on specified repositories.
members_countintegerrequired
repos_countintegerrequired
created_atstringrequired
updated_atstringrequired
organizationobjectrequired
Team Organization
ldap_dnstringoptional
The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team.
typestringrequired
The ownership type of the team
organization_idintegeroptional
Unique identifier of the organization to which this team belongs
enterprise_idintegeroptional
Unique identifier of the enterprise to which this team belongs
403Forbidden
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
422Validation failed, or the endpoint has been spammed.
messagestringrequired
documentation_urlstringrequired
errorsarray<object>optional
Error handling
A 403 is returned: Forbidden. A 422 is returned: Validation failed, or the endpoint has been spammed.