# 엔터프라이즈 팀 조직을 위한 REST API 엔드포인트

REST API를 사용하여 GitHub 엔터프라이즈에서 엔터프라이즈 팀에 대한 조직 할당을 만들고 관리합니다.

## 엔터프라이즈 팀 조직 정보

> \[!NOTE]
> 이 엔드포인트는 현재 공개 미리 보기 버전이며 변경될 수 있습니다.
>
> 이 API 문서는 GitHub Enterprise Cloud의 엔터프라이즈용입니다.
>
> 엔터프라이즈가 GHE가 아닌 Copilot Business라면, 이전에 공유된 초기 액세스 문서 링크를 참조하세요.

이 엔드포인트는 클래식 personal access tokens을 사용하는 엔터프라이즈 팀의 엔터프라이즈에 인증된 구성원만 사용할 수 있으며, 필요한 권한은 `read:enterprise` [scope](/ko/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps)(`GET` API용) 및 `admin:enterprise`(기타 API용)입니다.

이러한 엔드포인트는 fine-grained personal access tokens 또는 GitHub 앱 액세스 토큰과는 호환되지 않습니다.

GitHub는 팀 `name`에서 엔터프라이즈 팀의 `slug`를 생성하고 `ent:` 접두사를 추가합니다.

> \[!NOTE]
> Most endpoints use `Authorization: Bearer <YOUR-TOKEN>` and `Accept: application/vnd.github+json` headers, plus `X-GitHub-Api-Version: 2026-03-10`. Curl examples below omit these standard headers for brevity.

## Get organization assignments

```
GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations
```

Get all organizations assigned to an enterprise team

### Parameters

#### Headers

* **`accept`** (string)
  Setting to `application/vnd.github+json` is recommended.

#### Path and query parameters

* **`enterprise`** (string) (required)
  The slug version of the enterprise name.

* **`enterprise-team`** (string) (required)
  The slug version of the enterprise team name. You can also substitute this value with the enterprise team id.

* **`per_page`** (integer)
  The number of results per page (max 100). For more information, see "Using pagination in the REST API."
  Default: `30`

* **`page`** (integer)
  The page number of the results to fetch. For more information, see "Using pagination in the REST API."
  Default: `1`

### HTTP response status codes

* **200** - An array of organizations the team is assigned to

### Code examples

#### Example

**Request:**

```curl
curl -L \
  -X GET \
  https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/organizations
```

**Response schema (Status: 200):**

Array of `Organization Simple`:

* `login`: required, string
* `id`: required, integer
* `node_id`: required, string
* `url`: required, string, format: uri
* `repos_url`: required, string, format: uri
* `events_url`: required, string, format: uri
* `hooks_url`: required, string
* `issues_url`: required, string
* `members_url`: required, string
* `public_members_url`: required, string
* `avatar_url`: required, string
* `description`: required, string or null

## Add organization assignments

```
POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/add
```

Assign an enterprise team to multiple organizations.

### Parameters

#### Headers

* **`accept`** (string)
  Setting to `application/vnd.github+json` is recommended.

#### Path and query parameters

* **`enterprise`** (string) (required)
  The slug version of the enterprise name.

* **`enterprise-team`** (string) (required)
  The slug version of the enterprise team name. You can also substitute this value with the enterprise team id.

#### Body parameters

* **`organization_slugs`** (array of strings) (required)
  Organization slug to assign the team to.

### HTTP response status codes

* **200** - Successfully assigned the enterprise team to organizations.

### Code examples

#### Example

**Request:**

```curl
curl -L \
  -X POST \
  https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/organizations/add \
  -d '{
  "organization_slugs": [
    "github"
  ]
}'
```

**Response schema (Status: 200):**

Same response schema as [Get organization assignments](#get-organization-assignments).

## Remove organization assignments

```
POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove
```

Unassign an enterprise team from multiple organizations.

### Parameters

#### Headers

* **`accept`** (string)
  Setting to `application/vnd.github+json` is recommended.

#### Path and query parameters

* **`enterprise`** (string) (required)
  The slug version of the enterprise name.

* **`enterprise-team`** (string) (required)
  The slug version of the enterprise team name. You can also substitute this value with the enterprise team id.

#### Body parameters

* **`organization_slugs`** (array of strings) (required)
  Organization slug to unassign the team from.

### HTTP response status codes

* **204** - Successfully unassigned the enterprise team from organizations.

### Code examples

#### Example

**Request:**

```curl
curl -L \
  -X POST \
  https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/organizations/remove \
  -d '{
  "organization_slugs": [
    "github"
  ]
}'
```

**Response schema (Status: 204):**

## Get organization assignment

```
GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}
```

Check if an enterprise team is assigned to an organization

### Parameters

#### Headers

* **`accept`** (string)
  Setting to `application/vnd.github+json` is recommended.

#### Path and query parameters

* **`enterprise`** (string) (required)
  The slug version of the enterprise name.

* **`enterprise-team`** (string) (required)
  The slug version of the enterprise team name. You can also substitute this value with the enterprise team id.

* **`org`** (string) (required)
  The organization name. The name is not case sensitive.

### HTTP response status codes

* **200** - The team is assigned to the organization

* **404** - The team is not assigned to the organization

### Code examples

#### Example

**Request:**

```curl
curl -L \
  -X GET \
  https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/organizations/ORG
```

**Response schema (Status: 200):**

* `login`: required, string
* `id`: required, integer
* `node_id`: required, string
* `url`: required, string, format: uri
* `repos_url`: required, string, format: uri
* `events_url`: required, string, format: uri
* `hooks_url`: required, string
* `issues_url`: required, string
* `members_url`: required, string
* `public_members_url`: required, string
* `avatar_url`: required, string
* `description`: required, string or null

## Add an organization assignment

```
PUT /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}
```

Assign an enterprise team to an organization.

### Parameters

#### Headers

* **`accept`** (string)
  Setting to `application/vnd.github+json` is recommended.

#### Path and query parameters

* **`enterprise`** (string) (required)
  The slug version of the enterprise name.

* **`enterprise-team`** (string) (required)
  The slug version of the enterprise team name. You can also substitute this value with the enterprise team id.

* **`org`** (string) (required)
  The organization name. The name is not case sensitive.

### HTTP response status codes

* **201** - Successfully assigned the enterprise team to the organization.

### Code examples

#### Example

**Request:**

```curl
curl -L \
  -X PUT \
  https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/organizations/ORG
```

**Response schema (Status: 201):**

Same response schema as [Get organization assignment](#get-organization-assignment).

## Delete an organization assignment

```
DELETE /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}
```

Unassign an enterprise team from an organization.

### Parameters

#### Headers

* **`accept`** (string)
  Setting to `application/vnd.github+json` is recommended.

#### Path and query parameters

* **`enterprise`** (string) (required)
  The slug version of the enterprise name.

* **`enterprise-team`** (string) (required)
  The slug version of the enterprise team name. You can also substitute this value with the enterprise team id.

* **`org`** (string) (required)
  The organization name. The name is not case sensitive.

### HTTP response status codes

* **204** - Successfully unassigned the enterprise team from the organization.

### Code examples

#### Example

**Request:**

```curl
curl -L \
  -X DELETE \
  https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/organizations/ORG
```

**Response schema (Status: 204):**