{"meta":{"title":"REST API endpoints for enterprise team organizations","intro":"Use the REST API to create and manage organization assignments for enterprise teams in your GitHub enterprise.","product":"REST API","breadcrumbs":[{"href":"/en/rest","title":"REST API"},{"href":"/en/rest/enterprise-teams","title":"Enterprise teams"},{"href":"/en/rest/enterprise-teams/enterprise-team-organizations","title":"Enterprise team organizations"}],"documentType":"article"},"body":"# REST API endpoints for enterprise team organizations\n\nUse the REST API to create and manage organization assignments for enterprise teams in your GitHub enterprise.\n\n## About enterprise team organizations\n\nThese endpoints are only available to authenticated members of the enterprise team's enterprise with classic personal access tokens with the `read:enterprise` [scope](/en/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps) for `GET` APIs and `admin:enterprise` for other APIs.\n\nThese endpoints are not compatible with fine-grained personal access tokens or GitHub App access tokens.\n\nGitHub generates the enterprise team's `slug` from the team `name` and adds the `ent:` prefix.\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):**"}