Skip to content

Create an enterprise team

POST
/enterprises/{enterprise}/teams

To create an enterprise team, the authenticated user must be an owner of the enterprise.

API method documentation

enterprise
required
string

The slug version of the enterprise name.

Media type application/json
object
name
required

The name of the team.

string
description

A description of the team.

string
nullable
sync_to_organizations

Retired: this field is no longer supported. Whether the enterprise team should be reflected in each organization. This value cannot be set.

string
default: disabled
Allowed values: all disabled
organization_selection_type

Specifies which organizations in the enterprise should have access to this team. Can be one of disabled, selected, or all. disabled: The team is not assigned to any organizations. This is the default when you create a new team. selected: The team is assigned to specific organizations. You can then use the add organization assignments API endpoint. all: The team is assigned to all current and future organizations in the enterprise.

string
default: disabled
Allowed values: disabled selected all
group_id

The ID of the IdP group to assign team membership with. You can get this value from the REST API endpoints for SCIM.

string
nullable
notification_setting

The notification setting the team is set to. The options are:

  • notifications_enabled - team members receive notifications when the team is @mentioned.
  • notifications_disabled - no one receives notifications.

Default: notifications_enabled

string
Allowed values: notifications_enabled notifications_disabled
Examples
Example default
{
"name": "Justice League",
"description": "A great team.",
"group_id": "62ab9291-fae2-468e-974b-7e45096d5021"
}

Response

Media type application/json
Enterprise Team

Group of enterprise owners and/or members

object
id
required
integer format: int64
name
required
string
description
string
slug
required
string
url
required
string format: uri
sync_to_organizations

Retired: this field will not be returned with GHEC enterprise teams.

string
organization_selection_type
string
group_id
required
string
nullable
group_name

Retired: this field will not be returned with GHEC enterprise teams.

string
nullable
html_url
required
string format: uri
members_url
required
string
created_at
required
string format: date-time
updated_at
required
string format: date-time
notification_setting

Whether team members will receive notifications when the team is mentioned.

string
Allowed values: notifications_enabled notifications_disabled
Examples
Example default
{
"id": 1,
"name": "Justice League",
"description": "A great team.",
"slug": "justice-league",
"url": "https://api.github.com/enterprises/dc/teams/justice-league",
"group_id": "62ab9291-fae2-468e-974b-7e45096d5021",
"html_url": "https://github.com/enterprises/dc/teams/justice-league",
"members_url": "https://api.github.com/enterprises/dc/teams/justice-league/members{/member}",
"created_at": "2019-01-26T19:01:12Z",
"updated_at": "2019-01-26T19:14:43Z"
}