---
title: "Create a team"
method: POST
path: "/orgs/{org}/teams"
tags: ["teams"]
---

# Create a team

`POST /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://docs.github.com/enterprise-server@3.8/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/enterprise-server@3.8/github/setting-up-and-managing-organizations-and-teams/about-teams)".

## Path parameters

- `org` string, required

## Request body

- object
  - `name` string, required — The name of the team.
  - `description` string — The description of the team.
  - `maintainers` string[] — List GitHub IDs for organization members who will become team maintainers.
  - `repo_names` string[] — The full name (e.g., "organization-name/repository-name") of repositories to add the team to.
  - `privacy` 'secret' | 'closed' — 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`
  - `permission` 'pull' | 'push' — **Deprecated**. The permission that new repositories will be added to the team with when none is specified.
  - `parent_team_id` integer — The ID of a team to set as the parent team.
  - `ldap_dn` string — 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/enterprise-server@3.8/rest/enterprise-admin/ldap#update-ldap-mapping-for-a-team)" endpoint to change the LDAP DN. For more information, see "[Using LDAP](https://docs.github.com/enterprise-server@3.8/admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/using-ldap#enabling-ldap-sync)."

## Response `201`

Response

- TeamFull — Groups of organization members that gives permissions on specified repositories.
  - `id` integer, required — Unique identifier of the team
  - `node_id` string, required
  - `url` string, uri, required — URL for the team
  - `html_url` string, uri, required
  - `name` string, required — Name of the team
  - `slug` string, required
  - `description` string, nullable, required
  - `privacy` 'closed' | 'secret' — The level of privacy this team should have
  - `permission` string, required — Permission that the team will have for its repositories
  - `members_url` string, required
  - `repositories_url` string, uri, required
  - `parent` NullableTeamSimple, nullable — Groups of organization members that gives permissions on specified repositories.
    - `id` integer, required — Unique identifier of the team
    - `node_id` string, required
    - `url` string, uri, required — URL for the team
    - `members_url` string, required
    - `name` string, required — Name of the team
    - `description` string, nullable, required — Description of the team
    - `permission` string, required — Permission that the team will have for its repositories
    - `privacy` string — The level of privacy this team should have
    - `html_url` string, uri, required
    - `repositories_url` string, uri, required
    - `slug` string, required
    - `ldap_dn` string — Distinguished Name (DN) that team maps to within LDAP environment
  - `members_count` integer, required
  - `repos_count` integer, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `organization` TeamOrganization, required — Team Organization
    - `login` string, required
    - `id` integer, required
    - `node_id` string, required
    - `url` string, uri, required
    - `repos_url` string, uri, required
    - `events_url` string, uri, required
    - `hooks_url` string, required
    - `issues_url` string, required
    - `members_url` string, required
    - `public_members_url` string, required
    - `avatar_url` string, required
    - `description` string, nullable, required
    - `name` string
    - `company` string
    - `blog` string, uri
    - `location` string
    - `email` string, email
    - `twitter_username` string, nullable
    - `is_verified` boolean
    - `has_organization_projects` boolean, required
    - `has_repository_projects` boolean, required
    - `public_repos` integer, required
    - `public_gists` integer, required
    - `followers` integer, required
    - `following` integer, required
    - `html_url` string, uri, required
    - `created_at` string, date-time, required
    - `type` string, required
    - `total_private_repos` integer
    - `owned_private_repos` integer
    - `private_gists` integer, nullable
    - `disk_usage` integer, nullable
    - `collaborators` integer, nullable
    - `billing_email` string, email, nullable
    - `plan` object
      - `name` string, required
      - `space` integer, required
      - `private_repos` integer, required
      - `filled_seats` integer
      - `seats` integer
    - `default_repository_permission` string, nullable
    - `members_can_create_repositories` boolean, nullable
    - `two_factor_requirement_enabled` boolean, nullable
    - `members_allowed_repository_creation_type` string
    - `members_can_create_public_repositories` boolean
    - `members_can_create_private_repositories` boolean
    - `members_can_create_internal_repositories` boolean
    - `members_can_create_pages` boolean
    - `members_can_create_public_pages` boolean
    - `members_can_create_private_pages` boolean
    - `members_can_fork_private_repositories` boolean, nullable
    - `web_commit_signoff_required` boolean
    - `updated_at` string, date-time, required
  - `ldap_dn` string — Distinguished Name (DN) that team maps to within LDAP environment

## Other responses

- `403` — Forbidden
- `422` — Validation failed, or the endpoint has been spammed.

---

[API](https://skmtc.net/github/apis/github-v3-rest-api-7.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api-7/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api-7/versions/5438365412fe/schema)
