Use the REST API to create and manage organization assignments for enterprise teams in your GitHub enterprise.
These endpoints are only available to authenticated members of the enterprise team's enterprise with classic personal access tokens with the read:enterprise scope for GET APIs and admin:enterprise for other APIs.
These endpoints are not compatible with fine-grained personal access tokens or GitHub App access tokens.
GitHub generates the enterprise team's slug from the team name and adds the ent: prefix.
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 /enterprises/{enterprise}/teams/{enterprise-team}/organizations
Get all organizations assigned to an enterprise team
accept (string)application/vnd.github+json is recommended.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
Request:
curl -L \
-X GET \
https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/organizations
Response schema (Status: 200):
Array of Organization Simple:
login: required, stringid: required, integernode_id: required, stringurl: required, string, format: urirepos_url: required, string, format: urievents_url: required, string, format: urihooks_url: required, stringissues_url: required, stringmembers_url: required, stringpublic_members_url: required, stringavatar_url: required, stringdescription: required, string or nullPOST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/add
Assign an enterprise team to multiple organizations.
accept (string)application/vnd.github+json is recommended.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.
organization_slugs (array of strings) (required)Request:
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.
POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove
Unassign an enterprise team from multiple organizations.
accept (string)application/vnd.github+json is recommended.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.
organization_slugs (array of strings) (required)Request:
curl -L \
-X POST \
https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/organizations/remove \
-d '{
"organization_slugs": [
"github"
]
}'
Response schema (Status: 204):
GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}
Check if an enterprise team is assigned to an organization
accept (string)application/vnd.github+json is recommended.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.
200 - The team is assigned to the organization
404 - The team is not assigned to the organization
Request:
curl -L \
-X GET \
https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/organizations/ORG
Response schema (Status: 200):
login: required, stringid: required, integernode_id: required, stringurl: required, string, format: urirepos_url: required, string, format: urievents_url: required, string, format: urihooks_url: required, stringissues_url: required, stringmembers_url: required, stringpublic_members_url: required, stringavatar_url: required, stringdescription: required, string or nullPUT /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}
Assign an enterprise team to an organization.
accept (string)application/vnd.github+json is recommended.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.
Request:
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.
DELETE /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}
Unassign an enterprise team from an organization.
accept (string)application/vnd.github+json is recommended.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.
Request:
curl -L \
-X DELETE \
https://api.github.com/enterprises/ENTERPRISE/teams/ENTERPRISE-TEAM/organizations/ORG
Response schema (Status: 204):