{"meta":{"title":"Конечные точки REST API для организаций корпоративных групп","intro":"Используйте REST API для создания и управления назначениями организации для корпоративных команд в GitHub предприятии.","product":"REST API","breadcrumbs":[{"href":"/ru/enterprise-cloud@latest/rest","title":"REST API"},{"href":"/ru/enterprise-cloud@latest/rest/enterprise-teams","title":"Корпоративные функции команд"},{"href":"/ru/enterprise-cloud@latest/rest/enterprise-teams/enterprise-team-organizations","title":"Организации корпоративных команд"}],"documentType":"article"},"body":"# Конечные точки REST API для организаций корпоративных групп\n\nИспользуйте REST API для создания и управления назначениями организации для корпоративных команд в GitHub предприятии.\n\n## Об организациях корпоративной команды\n\nЭти конечные точки доступны только аутентифицированным членам корпоративной команды с классическим personal access tokens диапазоном `read:enterprise`[API](/ru/enterprise-cloud@latest/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps)`GET` и `admin:enterprise` других API.\n\nЭти конечные точки несовместимы с токенами доступа fine-grained personal access tokens или GitHub App.\n\nGitHub генерирует корпоративные команды `slug` из команды `name` и добавляет `ent:` префикс.\n\n> \\[!NOTE]\n> 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.\n\n## Get organization assignments\n\n```\nGET /enterprises/{enterprise}/teams/{enterprise-team}/organizations\n```\n\nGet all organizations assigned to an enterprise team\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`enterprise`** (string) (required)\n  The slug version of the enterprise name.\n\n* **`enterprise-team`** (string) (required)\n  The slug version of the enterprise team name. You can also substitute this value with the enterprise team id.\n\n* **`per_page`** (integer)\n  The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"\n  Default: `30`\n\n* **`page`** (integer)\n  The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"\n  Default: `1`\n\n### HTTP response status codes\n\n* **200** - An array of organizations the team is assigned to\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/organizations\n```\n\n**Response schema (Status: 200):**\n\nArray of `Organization Simple`:\n\n* `login`: required, string\n* `id`: required, integer\n* `node_id`: required, string\n* `url`: required, string, format: uri\n* `repos_url`: required, string, format: uri\n* `events_url`: required, string, format: uri\n* `hooks_url`: required, string\n* `issues_url`: required, string\n* `members_url`: required, string\n* `public_members_url`: required, string\n* `avatar_url`: required, string\n* `description`: required, string or null\n\n## Add organization assignments\n\n```\nPOST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/add\n```\n\nAssign an enterprise team to multiple organizations.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`enterprise`** (string) (required)\n  The slug version of the enterprise name.\n\n* **`enterprise-team`** (string) (required)\n  The slug version of the enterprise team name. You can also substitute this value with the enterprise team id.\n\n#### Body parameters\n\n* **`organization_slugs`** (array of strings) (required)\n  Organization slug to assign the team to.\n\n### HTTP response status codes\n\n* **200** - Successfully assigned the enterprise team to organizations.\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/organizations/add \\\n  -d '{\n  \"organization_slugs\": [\n    \"github\"\n  ]\n}'\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [Get organization assignments](#get-organization-assignments).\n\n## Remove organization assignments\n\n```\nPOST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove\n```\n\nUnassign an enterprise team from multiple organizations.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`enterprise`** (string) (required)\n  The slug version of the enterprise name.\n\n* **`enterprise-team`** (string) (required)\n  The slug version of the enterprise team name. You can also substitute this value with the enterprise team id.\n\n#### Body parameters\n\n* **`organization_slugs`** (array of strings) (required)\n  Organization slug to unassign the team from.\n\n### HTTP response status codes\n\n* **204** - Successfully unassigned the enterprise team from organizations.\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/organizations/remove \\\n  -d '{\n  \"organization_slugs\": [\n    \"github\"\n  ]\n}'\n```\n\n**Response schema (Status: 204):**\n\n## Get organization assignment\n\n```\nGET /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}\n```\n\nCheck if an enterprise team is assigned to an organization\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`enterprise`** (string) (required)\n  The slug version of the enterprise name.\n\n* **`enterprise-team`** (string) (required)\n  The slug version of the enterprise team name. You can also substitute this value with the enterprise team id.\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n### HTTP response status codes\n\n* **200** - The team is assigned to the organization\n\n* **404** - The team is not assigned to the organization\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/organizations/ORG\n```\n\n**Response schema (Status: 200):**\n\n* `login`: required, string\n* `id`: required, integer\n* `node_id`: required, string\n* `url`: required, string, format: uri\n* `repos_url`: required, string, format: uri\n* `events_url`: required, string, format: uri\n* `hooks_url`: required, string\n* `issues_url`: required, string\n* `members_url`: required, string\n* `public_members_url`: required, string\n* `avatar_url`: required, string\n* `description`: required, string or null\n\n## Add an organization assignment\n\n```\nPUT /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}\n```\n\nAssign an enterprise team to an organization.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`enterprise`** (string) (required)\n  The slug version of the enterprise name.\n\n* **`enterprise-team`** (string) (required)\n  The slug version of the enterprise team name. You can also substitute this value with the enterprise team id.\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n### HTTP response status codes\n\n* **201** - Successfully assigned the enterprise team to the organization.\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X PUT \\\n  https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/organizations/ORG\n```\n\n**Response schema (Status: 201):**\n\nSame response schema as [Get organization assignment](#get-organization-assignment).\n\n## Delete an organization assignment\n\n```\nDELETE /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}\n```\n\nUnassign an enterprise team from an organization.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`enterprise`** (string) (required)\n  The slug version of the enterprise name.\n\n* **`enterprise-team`** (string) (required)\n  The slug version of the enterprise team name. You can also substitute this value with the enterprise team id.\n\n* **`org`** (string) (required)\n  The organization name. The name is not case sensitive.\n\n### HTTP response status codes\n\n* **204** - Successfully unassigned the enterprise team from the organization.\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X DELETE \\\n  https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/organizations/ORG\n```\n\n**Response schema (Status: 204):**"}